From 3d82a47d071179b59a4419fcd947cdfffdeea261 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 28 Feb 2024 20:16:11 +1100 Subject: [PATCH] Update Yarn config and handle macOS paths properly --- .vscode/extensions.json | 3 ++- .yarnrc.yml | 10 +++++++--- package.json | 7 +------ src/helpers/UsernameHelper.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 06dd640..a07b6d6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ - "arcanis.vscode-zipfs" + "arcanis.vscode-zipfs", + "usernamehw.errorlens" ] } diff --git a/.yarnrc.yml b/.yarnrc.yml index 478d8d1..f3ade6c 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,9 +1,13 @@ compressionLevel: mixed - enableGlobalCache: false - progressBarStyle: "simba" - +defaultSemverRangePrefix: "" +supportedArchitectures: + os: + - "linux" + - "darwin" + cpu: + - "x64" npmScopes: toast: npmRegistryServer: https://git.toast-server.net/api/packages/toast/npm/ diff --git a/package.json b/package.json index 0fccebb..bc42c78 100644 --- a/package.json +++ b/package.json @@ -12,17 +12,12 @@ "sdk": "yarn dlx @yarnpkg/sdks vscode" }, "author": "Toast", - "license": "ISC", "os": [ - "win32", "linux", "darwin" ], "cpu": [ - "x64", - "!arm64", - "!mips", - "!ia32" + "x64" ], "engines": { "node": ">=18.18.0, <19 || >=20", diff --git a/src/helpers/UsernameHelper.ts b/src/helpers/UsernameHelper.ts index dc0f8bb..93647bf 100644 --- a/src/helpers/UsernameHelper.ts +++ b/src/helpers/UsernameHelper.ts @@ -1,4 +1,4 @@ export default (text:string)=>{ - const dirSlash = process.platform === 'linux' ? '\/' : '\\'; + const dirSlash = (process.platform === 'linux' || process.platform === 'darwin') ? '\/' : '\\'; return text?.replace(/(?<=\/Users\/|\/home\/|\/media\/)[^/]+/g, match=>'・'.repeat(match.length)).split(dirSlash).join(dirSlash); }