From b7fec801851465307d84e2b4b6361da5ab1b4354 Mon Sep 17 00:00:00 2001 From: Sergey Petushkov Date: Thu, 7 Sep 2023 15:25:18 +0200 Subject: [PATCH] chore(ci): fix package publish next COMPASS-6860 (#4817) * chore: make sure all plugins are published * chore: split version-next and package-next so we can run them separately and retry publish * chore(compass-aggregations): fix types --- .evergreen/functions.yml | 6 +++++- package-lock.json | 16 ++++++++-------- package.json | 3 ++- .../pipeline-parser/pipeline-parser.ts | 5 ++++- packages/compass-app-stores/package.json | 6 ++++-- packages/compass-explain-plan/package.json | 2 +- packages/compass-field-store/package.json | 6 ++++-- packages/compass/package.json | 4 ++-- 8 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.evergreen/functions.yml b/.evergreen/functions.yml index 10c0f5047ed..2c4ba9c34e4 100644 --- a/.evergreen/functions.yml +++ b/.evergreen/functions.yml @@ -560,7 +560,11 @@ functions: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc npm config list echo "Publishing packages as $(npm whoami)" - git update-index --assume-unchanged .npmrc + npm run version-packages-next + # unstage after lerna staged version + git reset + # mark files as unchanged so that lerna can publish + git update-index --assume-unchanged $(git diff --name-only HEAD) bash ".evergreen/retry-with-backoff.sh" npm run publish-packages-next fi diff --git a/package-lock.json b/package-lock.json index acb4f4b50d0..90ca352fefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44279,14 +44279,14 @@ "@electron/remote": "^2.0.11", "@mongodb-js/atlas-service": "^0.3.0", "@mongodb-js/compass-aggregations": "^9.13.0", - "@mongodb-js/compass-app-stores": "^0.5.2", + "@mongodb-js/compass-app-stores": "^7.0.0", "@mongodb-js/compass-collection": "^4.12.0", "@mongodb-js/compass-crud": "^13.12.0", "@mongodb-js/compass-database": "^3.12.0", "@mongodb-js/compass-databases-collections": "^1.12.0", "@mongodb-js/compass-explain-plan": "^6.12.0", "@mongodb-js/compass-export-to-language": "^8.12.0", - "@mongodb-js/compass-field-store": "^0.3.1", + "@mongodb-js/compass-field-store": "^9.0.0", "@mongodb-js/compass-find-in-page": "^4.12.0", "@mongodb-js/compass-home": "^6.13.0", "@mongodb-js/compass-import-export": "^7.12.0", @@ -44517,7 +44517,7 @@ }, "packages/compass-app-stores": { "name": "@mongodb-js/compass-app-stores", - "version": "0.5.2", + "version": "7.0.0", "license": "SSPL", "dependencies": { "mongodb-instance-model": "^12.9.2" @@ -46062,7 +46062,7 @@ "compass-preferences-model": "^2.12.0" }, "devDependencies": { - "@mongodb-js/compass-field-store": "^0.3.1", + "@mongodb-js/compass-field-store": "^9.0.0", "@mongodb-js/eslint-config-compass": "^1.0.8", "@mongodb-js/mocha-config-compass": "^1.3.0", "@mongodb-js/prettier-config-compass": "^1.0.1", @@ -46213,7 +46213,7 @@ }, "packages/compass-field-store": { "name": "@mongodb-js/compass-field-store", - "version": "0.3.1", + "version": "9.0.0", "license": "SSPL", "devDependencies": { "@mongodb-js/eslint-config-compass": "^1.0.8", @@ -59108,7 +59108,7 @@ "@mongodb-js/compass-components": "^1.12.0", "@mongodb-js/compass-crud": "^13.12.0", "@mongodb-js/compass-editor": "^0.11.0", - "@mongodb-js/compass-field-store": "^0.3.1", + "@mongodb-js/compass-field-store": "^9.0.0", "@mongodb-js/compass-logging": "^1.1.8", "@mongodb-js/eslint-config-compass": "^1.0.8", "@mongodb-js/explain-plan-helper": "^1.1.1", @@ -85936,14 +85936,14 @@ "@electron/remote": "^2.0.11", "@mongodb-js/atlas-service": "^0.3.0", "@mongodb-js/compass-aggregations": "^9.13.0", - "@mongodb-js/compass-app-stores": "^0.5.2", + "@mongodb-js/compass-app-stores": "^7.0.0", "@mongodb-js/compass-collection": "^4.12.0", "@mongodb-js/compass-crud": "^13.12.0", "@mongodb-js/compass-database": "^3.12.0", "@mongodb-js/compass-databases-collections": "^1.12.0", "@mongodb-js/compass-explain-plan": "^6.12.0", "@mongodb-js/compass-export-to-language": "^8.12.0", - "@mongodb-js/compass-field-store": "^0.3.1", + "@mongodb-js/compass-field-store": "^9.0.0", "@mongodb-js/compass-find-in-page": "^4.12.0", "@mongodb-js/compass-home": "^6.13.0", "@mongodb-js/compass-import-export": "^7.12.0", diff --git a/package.json b/package.json index 1a856edb9e7..010fba97d20 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "where": "monorepo-where", "create-workspace": "node ./scripts/create-workspace.js", "update-evergreen-config": "node .evergreen/template-yml.js", - "publish-packages-next": "npx lerna publish from-package \"0.0.0-next-$(git rev-parse HEAD)\" --force-publish --exact --no-git-tag-version --no-private --dist-tag next --pre-dist-tag next --no-verify-access --no-git-reset --yes", + "version-packages-next": "npx lerna version \"0.0.0-next-$(git rev-parse HEAD)\" --exact --no-private --no-git-tag-version --force-publish --no-push --yes", + "publish-packages-next": "npx lerna publish from-package --no-private --dist-tag next --pre-dist-tag next --yes", "prepare": "husky install", "snyk-test": "node scripts/snyk-test.js", "pregenerate-vulnerability-report": "npm run compile -w packages/compass && npm run snyk-test", diff --git a/packages/compass-aggregations/src/modules/pipeline-builder/pipeline-parser/pipeline-parser.ts b/packages/compass-aggregations/src/modules/pipeline-builder/pipeline-parser/pipeline-parser.ts index 1e71296e392..f82691e79d0 100644 --- a/packages/compass-aggregations/src/modules/pipeline-builder/pipeline-parser/pipeline-parser.ts +++ b/packages/compass-aggregations/src/modules/pipeline-builder/pipeline-parser/pipeline-parser.ts @@ -239,7 +239,10 @@ export default class PipelineParser { } function getLineOnlySourceLocation(line: number) { - return { start: { line, column: 0 }, end: { line, column: 0 } }; + return { + start: { line, column: 0 }, + end: { line, column: 0 }, + } as t.SourceLocation; } function adjustStageLoc(stage: t.Node, line: number) { diff --git a/packages/compass-app-stores/package.json b/packages/compass-app-stores/package.json index e580026357c..ded8abba730 100644 --- a/packages/compass-app-stores/package.json +++ b/packages/compass-app-stores/package.json @@ -6,13 +6,12 @@ "name": "MongoDB Inc", "email": "compass@mongodb.com" }, - "private": true, "bugs": { "url": "https://jira.mongodb.org/projects/COMPASS/issues", "email": "compass@mongodb.com" }, "homepage": "https://github.com/mongodb-js/compass", - "version": "0.5.2", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/mongodb-js/compass.git" @@ -81,5 +80,8 @@ }, "peerDependencies": { "mongodb-instance-model": "^12.9.2" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/compass-explain-plan/package.json b/packages/compass-explain-plan/package.json index 3c263a867f3..bd9ac7f9828 100644 --- a/packages/compass-explain-plan/package.json +++ b/packages/compass-explain-plan/package.json @@ -66,7 +66,7 @@ "react": "^17.0.2" }, "devDependencies": { - "@mongodb-js/compass-field-store": "^0.3.1", + "@mongodb-js/compass-field-store": "^9.0.0", "@mongodb-js/eslint-config-compass": "^1.0.8", "@mongodb-js/mocha-config-compass": "^1.3.0", "@mongodb-js/prettier-config-compass": "^1.0.1", diff --git a/packages/compass-field-store/package.json b/packages/compass-field-store/package.json index c2f4b5db6c6..193a84503db 100644 --- a/packages/compass-field-store/package.json +++ b/packages/compass-field-store/package.json @@ -6,13 +6,12 @@ "name": "MongoDB Inc", "email": "compass@mongodb.com" }, - "private": true, "bugs": { "url": "https://jira.mongodb.org/projects/COMPASS/issues", "email": "compass@mongodb.com" }, "homepage": "https://github.com/mongodb-js/compass", - "version": "0.3.1", + "version": "9.0.0", "repository": { "type": "git", "url": "https://github.com/mongodb-js/compass.git" @@ -77,5 +76,8 @@ "reflux-state-mixin": "github:mongodb-js/reflux-state-mixin", "sinon": "^9.2.3", "xvfb-maybe": "^0.2.1" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/compass/package.json b/packages/compass/package.json index 6f7425d6448..64a6813d0e3 100644 --- a/packages/compass/package.json +++ b/packages/compass/package.json @@ -183,14 +183,14 @@ "@electron/remote": "^2.0.11", "@mongodb-js/atlas-service": "^0.3.0", "@mongodb-js/compass-aggregations": "^9.13.0", - "@mongodb-js/compass-app-stores": "^0.5.2", + "@mongodb-js/compass-app-stores": "^7.0.0", "@mongodb-js/compass-collection": "^4.12.0", "@mongodb-js/compass-crud": "^13.12.0", "@mongodb-js/compass-database": "^3.12.0", "@mongodb-js/compass-databases-collections": "^1.12.0", "@mongodb-js/compass-explain-plan": "^6.12.0", "@mongodb-js/compass-export-to-language": "^8.12.0", - "@mongodb-js/compass-field-store": "^0.3.1", + "@mongodb-js/compass-field-store": "^9.0.0", "@mongodb-js/compass-find-in-page": "^4.12.0", "@mongodb-js/compass-home": "^6.13.0", "@mongodb-js/compass-import-export": "^7.12.0",