Skip to content

Commit

Permalink
Merge pull request #1448 from glimmerjs/setup-release-it-for-monorepos
Browse files Browse the repository at this point in the history
Setup release it
  • Loading branch information
NullVoxPopuli authored Oct 23, 2023
2 parents 8caba05 + 8fec0f8 commit 3d94e94
Show file tree
Hide file tree
Showing 3 changed files with 2,865 additions and 770 deletions.
26 changes: 25 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@
"@rollup/pluginutils": "5",
"rollup": "3"
}
},
"patchedDependencies": {
"@release-it-plugins/[email protected]": "patches/@[email protected]"
}
},
"devDependencies": {
"@glimmer-workspace/eslint-plugin": "workspace:^",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-modules-commonjs": "^7.21.5",
"@babel/plugin-transform-runtime": "^7.21.4",
Expand All @@ -57,8 +59,11 @@
"@babel/traverse": "^7.21.5",
"@babel/types": "^7.21.5",
"@glimmer-workspace/build-support": "workspace:^",
"@glimmer-workspace/eslint-plugin": "workspace:^",
"@glimmer-workspace/integration-tests": "workspace:^",
"@glimmer/env": "0.1.7",
"@release-it-plugins/lerna-changelog": "^6.0.0",
"@release-it-plugins/workspaces": "^4.0.0",
"@rollup/plugin-terser": "^0.4.1",
"@types/babel-plugin-macros": "^3.1.0",
"@types/babel__core": "^7.20.0",
Expand Down Expand Up @@ -99,6 +104,7 @@
"puppeteer": "^20.1.2",
"puppeteer-chromium-resolver": "^20.0.0",
"qunit": "^2.19.4",
"release-it": "^16.2.1",
"rimraf": "^5.0.0",
"rollup": "^3.21.6",
"semver": "^7.5.2",
Expand All @@ -113,6 +119,24 @@
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"release-it": {
"plugins": {
"@release-it-plugins/workspaces": {
"publish": false,
"workspaces": [
"packages/@glimmer/*"
],
"additionalManifests": {
"dependencyUpdates": []
}
},
"@release-it-plugins/lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"npm": false
},
"changelog": {
"repo": "glimmerjs/glimmer-vm",
"labels": {
Expand Down
20 changes: 20 additions & 0 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/index.js b/index.js
index e6bbba3081bc7327a1017425f41830dcc0342fa3..6b84982c9c675ed0a54ff34b4ac148216160d48b 100644
--- a/index.js
+++ b/index.js
@@ -331,6 +331,15 @@ export default class WorkspacesPlugin extends Plugin {
for (let dependency in dependencies) {
if (workspaces.find((w) => w.name === dependency)) {
const existingVersion = dependencies[dependency];
+
+ /**
+ * If pnpm is being used, the Workspace protocol may also be used
+ * https://pnpm.io/workspaces#workspace-protocol-workspace
+ * if it is, these version references are handled on publish
+ * by `pnpm publish`.
+ */
+ if (existingVersion.startsWith('workspace:')) continue;
+
const replacementVersion = this._buildReplacementDepencencyVersion(
existingVersion,
newVersion
Loading

0 comments on commit 3d94e94

Please sign in to comment.