From 30131089f681b8f8c2c961581702ae76dc7f0391 Mon Sep 17 00:00:00 2001 From: Mo Date: Sun, 12 Jun 2022 22:06:32 -0500 Subject: [PATCH] chore: use yarn workspace: protocol to resolve local packages --- constraints.pro | 5 ++++ packages/desktop/package.json | 2 +- .../{afterSignHook.js => notarizeMac.js} | 0 packages/mobile/package.json | 2 +- packages/toast/package.json | 2 +- packages/web-server/package.json | 4 +-- packages/web/package.json | 6 ++--- yarn.lock | 26 +++++++++---------- 8 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 constraints.pro rename packages/desktop/scripts/{afterSignHook.js => notarizeMac.js} (100%) diff --git a/constraints.pro b/constraints.pro new file mode 100644 index 000000000..5e8459536 --- /dev/null +++ b/constraints.pro @@ -0,0 +1,5 @@ +% This rule enforces that all workspaces must depend on other workspaces using `workspace:*` +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:*', DependencyType) :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, _, DependencyType), + DependencyType \= 'peerDependencies', + workspace_ident(DependencyCwd, DependencyIdent). \ No newline at end of file diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 096a9588b..2ea350846 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -36,7 +36,7 @@ "dependencies": { "@electron/remote": "^2.0.8", "@standardnotes/electron-clear-data": "1.1.1", - "@standardnotes/web": "^3.22.1", + "@standardnotes/web": "workspace:*", "axios": "^0.27.2", "compare-versions": "^4.1.3", "decrypt": "github:standardnotes/decrypt#master", diff --git a/packages/desktop/scripts/afterSignHook.js b/packages/desktop/scripts/notarizeMac.js similarity index 100% rename from packages/desktop/scripts/afterSignHook.js rename to packages/desktop/scripts/notarizeMac.js diff --git a/packages/mobile/package.json b/packages/mobile/package.json index e288bb425..27467b10d 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -33,7 +33,7 @@ "@react-navigation/stack": "^6.2.1", "@standardnotes/components": "^1.9.1", "@standardnotes/filepicker": "^1.16.14", - "@standardnotes/icons": "^1.4.0", + "@standardnotes/icons": "workspace:*", "@standardnotes/react-native-aes": "^1.4.3", "@standardnotes/react-native-textview": "1.0.2", "@standardnotes/react-native-utils": "1.0.1", diff --git a/packages/toast/package.json b/packages/toast/package.json index 3186a84e7..5fe501f2f 100644 --- a/packages/toast/package.json +++ b/packages/toast/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@nanostores/react": "^0.2.0", - "@standardnotes/icons": "^1.4.0", + "@standardnotes/icons": "workspace:*", "nanoid": "^3.3.4", "nanostores": "^0.5.12", "react": "link:../web/node_modules/react", diff --git a/packages/web-server/package.json b/packages/web-server/package.json index 5ce1b56c2..558a767b1 100644 --- a/packages/web-server/package.json +++ b/packages/web-server/package.json @@ -16,7 +16,7 @@ "build:server:all": "yarn workspaces foreach -ptR run build" }, "dependencies": { - "@standardnotes/components-meta": "^0.2.0", - "@standardnotes/web": "^3.22.1" + "@standardnotes/components-meta": "workspace:*", + "@standardnotes/web": "workspace:*" } } diff --git a/packages/web/package.json b/packages/web/package.json index 23a645a8d..ebf6172b3 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -65,12 +65,12 @@ "@reach/visually-hidden": "^0.16.0", "@standardnotes/components": "1.9.1", "@standardnotes/filepicker": "1.16.14", - "@standardnotes/icons": "^1.4.0", + "@standardnotes/icons": "workspace:*", "@standardnotes/services": "^1.13.14", "@standardnotes/sncrypto-web": "1.10.1", "@standardnotes/snjs": "^2.115.9", - "@standardnotes/styles": "^1.2.1", - "@standardnotes/toast": "^1.2.0", + "@standardnotes/styles": "workspace:*", + "@standardnotes/toast": "workspace:*", "@zip.js/zip.js": "^2.4.10", "mobx": "^6.5.0", "mobx-react-lite": "^3.3.0", diff --git a/yarn.lock b/yarn.lock index 2c8316b91..5b551fe47 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5670,7 +5670,7 @@ __metadata: languageName: node linkType: hard -"@standardnotes/components-meta@^0.2.0, @standardnotes/components-meta@workspace:packages/components": +"@standardnotes/components-meta@workspace:*, @standardnotes/components-meta@workspace:packages/components": version: 0.0.0-use.local resolution: "@standardnotes/components-meta@workspace:packages/components" dependencies: @@ -5713,7 +5713,7 @@ __metadata: "@commitlint/config-conventional": ^16.2.4 "@electron/remote": ^2.0.8 "@standardnotes/electron-clear-data": 1.1.1 - "@standardnotes/web": ^3.22.1 + "@standardnotes/web": "workspace:*" "@types/lodash": ^4.14.182 "@types/mime-types": ^2.1.1 "@types/node": 15 @@ -5886,7 +5886,7 @@ __metadata: languageName: unknown linkType: soft -"@standardnotes/icons@^1.1.8, @standardnotes/icons@^1.4.0, @standardnotes/icons@workspace:packages/icons": +"@standardnotes/icons@^1.1.8, @standardnotes/icons@workspace:*, @standardnotes/icons@workspace:packages/icons": version: 0.0.0-use.local resolution: "@standardnotes/icons@workspace:packages/icons" dependencies: @@ -5987,7 +5987,7 @@ __metadata: "@standardnotes/components": ^1.9.1 "@standardnotes/config": ^2.4.3 "@standardnotes/filepicker": ^1.16.14 - "@standardnotes/icons": ^1.4.0 + "@standardnotes/icons": "workspace:*" "@standardnotes/react-native-aes": ^1.4.3 "@standardnotes/react-native-textview": 1.0.2 "@standardnotes/react-native-utils": 1.0.1 @@ -6235,7 +6235,7 @@ __metadata: languageName: node linkType: hard -"@standardnotes/styles@^1.2.1, @standardnotes/styles@workspace:packages/styles": +"@standardnotes/styles@workspace:*, @standardnotes/styles@workspace:packages/styles": version: 0.0.0-use.local resolution: "@standardnotes/styles@workspace:packages/styles" dependencies: @@ -6256,12 +6256,12 @@ __metadata: languageName: unknown linkType: soft -"@standardnotes/toast@^1.2.0, @standardnotes/toast@workspace:packages/toast": +"@standardnotes/toast@workspace:*, @standardnotes/toast@workspace:packages/toast": version: 0.0.0-use.local resolution: "@standardnotes/toast@workspace:packages/toast" dependencies: "@nanostores/react": ^0.2.0 - "@standardnotes/icons": ^1.4.0 + "@standardnotes/icons": "workspace:*" "@types/react": "link:../web/node_modules/@types/react" "@types/react-dom": "link:../web/node_modules/@types/react-dom" eslint: "*" @@ -6299,12 +6299,12 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/web-server@workspace:packages/web-server" dependencies: - "@standardnotes/components-meta": ^0.2.0 - "@standardnotes/web": ^3.22.1 + "@standardnotes/components-meta": "workspace:*" + "@standardnotes/web": "workspace:*" languageName: unknown linkType: soft -"@standardnotes/web@^3.22.1, @standardnotes/web@workspace:packages/web": +"@standardnotes/web@workspace:*, @standardnotes/web@workspace:packages/web": version: 0.0.0-use.local resolution: "@standardnotes/web@workspace:packages/web" dependencies: @@ -6322,12 +6322,12 @@ __metadata: "@reach/visually-hidden": ^0.16.0 "@standardnotes/components": 1.9.1 "@standardnotes/filepicker": 1.16.14 - "@standardnotes/icons": ^1.4.0 + "@standardnotes/icons": "workspace:*" "@standardnotes/services": ^1.13.14 "@standardnotes/sncrypto-web": 1.10.1 "@standardnotes/snjs": ^2.115.9 - "@standardnotes/styles": ^1.2.1 - "@standardnotes/toast": ^1.2.0 + "@standardnotes/styles": "workspace:*" + "@standardnotes/toast": "workspace:*" "@types/jest": ^27.4.1 "@types/react": ^17.0.42 "@types/react-dom": ^18.0.5