Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Due to: https://github.com/changesets/changesets/issues/835 #781

Merged
merged 2 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/pnpm
- name: Install Dependencies (without lockfile)
run: rm pnpm-lock.yaml && pnpm install
run: rm pnpm-lock.yaml && pnpm install --force
- uses: ./.github/actions/download-built-package
- run: pnpm --filter ember-app test:ember

Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
"pnpm": {
"overrides": {
"@types/eslint": "7.29.0",
"@changesets/assemble-release-plan": "5.2.3",
"mustache": "^4.2.0"
},
"overrides-notes": {
"@changesets/assemble-release-plan": "patched, we don't want drift until https://github.com/changesets/changesets/issues/835 is resolved",
"@embroider/addon-shim": "some addons from the test-app are not using ^1.0.0",
"@types/eslint": "webpack brings in @types/eslint@8, which breaks our type checking",
"mustache": "ember-cli -> testem -> consolidate -> mustache is ancient"
Expand All @@ -49,6 +51,9 @@
"allowedVersions": {
"typescript": "*"
}
},
"patchedDependencies": {
"@changesets/[email protected]": "patches/@[email protected]"
}
}
}
39 changes: 39 additions & 0 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/dist/assemble-release-plan.cjs.dev.js b/dist/assemble-release-plan.cjs.dev.js
index 3a37c62c975518f975c22e1b4b3974d9b325a5da..4aaad4630b4d3cf31738b105d8a1e42a428cee2c 100644
--- a/dist/assemble-release-plan.cjs.dev.js
+++ b/dist/assemble-release-plan.cjs.dev.js
@@ -430,7 +430,7 @@ function applyLinks(releases, packagesByName, linked) {

function getPreVersion(version) {
let parsed = semver.parse(version);
- let preVersion = parsed.prerelease[1] === undefined ? -1 : parsed.prerelease[1];
+ let preVersion = parsed?.prerelease[1] === undefined ? -1 : parsed.prerelease[1];

if (typeof preVersion !== "number") {
throw new errors.InternalError("preVersion is not a number");
diff --git a/dist/assemble-release-plan.cjs.prod.js b/dist/assemble-release-plan.cjs.prod.js
index 87b4c104bf3fa53ba498ced6f81eda0ed4c86436..bbd6f6a9dadef83b1bb5b95e6883b2fd235fe653 100644
--- a/dist/assemble-release-plan.cjs.prod.js
+++ b/dist/assemble-release-plan.cjs.prod.js
@@ -214,7 +214,7 @@ function applyLinks(releases, packagesByName, linked) {
}

function getPreVersion(version) {
- let parsed = semver.parse(version), preVersion = void 0 === parsed.prerelease[1] ? -1 : parsed.prerelease[1];
+ let parsed = semver.parse(version), preVersion = void 0 === parsed?.prerelease[1] ? -1 : parsed.prerelease[1];
if ("number" != typeof preVersion) throw new errors.InternalError("preVersion is not a number");
return preVersion++, preVersion;
}
diff --git a/src/index.ts b/src/index.ts
index 3ffb6fa772b78506bd7de7a4fcb41c004733b00d..54c64132371059e535d9fe2f9b946f1c5d2cee45 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -24,7 +24,7 @@ type SnapshotReleaseParameters = {
function getPreVersion(version: string) {
let parsed = semver.parse(version)!;
let preVersion =
- parsed.prerelease[1] === undefined ? -1 : parsed.prerelease[1];
+ parsed?.prerelease[1] === undefined ? -1 : parsed.prerelease[1];
if (typeof preVersion !== "number") {
throw new InternalError("preVersion is not a number");
}
Loading