From 23d93cc0865149bcab7a8b2c8cc38377b5fa85b3 Mon Sep 17 00:00:00 2001 From: bigopon Date: Mon, 25 Apr 2022 21:53:36 +1000 Subject: [PATCH] chore: try fix dev publish --- .circleci/config.yml | 40 +++++++++++++++++++++++++++++----------- package.json | 7 +++---- scripts/publish.js | 4 +++- scripts/publish.ts | 2 ++ 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index de5464c938..dbd6de4747 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,6 +69,12 @@ executors: docker: - image: "cimg/node:<< parameters.node >>-browsers" + docker-release: + working_directory: *working_dir + resource_class: large + docker: + - image: "cimg/node:16.14.2" + docker-circleci-bench: working_directory: *working_dir resource_class: large @@ -81,8 +87,15 @@ executors: commands: checkout_install: + parameters: + install_drivers: + type: boolean + default: true steps: - - browser-tools/install-browser-tools + - when: + condition: <> + steps: + - browser-tools/install-browser-tools - checkout - run: echo 'export PREFERRED_WORKSPACE_MANAGER=yarn' >> $BASH_ENV - run: npm ci @@ -261,7 +274,7 @@ jobs: - run: npm run lint:other:ci merge_and_dist: - executor: docker-circleci + executor: docker-release parameters: from: type: string @@ -285,7 +298,8 @@ jobs: - run: git config --global user.email "aurelia@bluespire.com" - run: git config --global user.name "AureliaEffect" - run: git config --global core.mergeoptions "--no-edit" - - checkout_install + - checkout_install: + install_drivers: false - run: set -o pipefail && npm run build:release # - run: set -o pipefail && npm run change-tsconfigs:invert # - run: set -o pipefail && npm run build:release @@ -307,7 +321,7 @@ jobs: destination: << parameters.dist_file_name >>.zip publish_npm: - executor: docker-circleci + executor: docker-release parameters: channel: type: string @@ -318,17 +332,20 @@ jobs: default: false steps: - checkout + - run: sudo npm i -g ts-node@10 @types/node@14 - when: condition: << parameters.swap >> steps: - run: git checkout << parameters.branch >> - run: git pull + - run: zip -r publish_npm_<< parameters.channel>>.zip packages/*/dist packages/*/package.json + - store_artifacts: + path: publish_npm_<< parameters.channel>>.zip + destination: publish_npm_<< parameters.channel>>.zip - run: name: "Authenticate with registry" command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - - run: | - npm ci - npm run publish:<< parameters.channel >> + - run: npm run publish:<< parameters.channel >> # Standalone playwright test jobs e2e_playwright: @@ -532,7 +549,7 @@ workflows: npm_command: "test-node" requires: - check_doc_abort - #- unit_test: + #- unit_test_aot: # <<: *filter_ignore_develop_release # name: test_test262 # npm_command: "test-262" @@ -558,18 +575,17 @@ workflows: path: "examples/jit-webpack-conventions-ts" requires: - check_doc_abort - # - lint_packages # not a real requirement but forces long-running jobs to go first - e2e_playwright: <<: *filter_ignore_develop_release name: jit-webpack-vanilla-ts path: "examples/jit-webpack-vanilla-ts" requires: - check_doc_abort - # - lint_packages # not a real requirement but forces long-running jobs to go first - merge_and_dist: <<: *filter_only_master name: merge_and_dist_master requires: + - check_doc_abort - unit_test_esm_chrome - unit_test_esm_firefox - unit_test_esm_node @@ -594,6 +610,7 @@ workflows: dist_file_name: merge_and_dist_topic - publish_npm: <<: *filter_only_master + name: "publish_npm_dev" channel: dev branch: develop swap: true @@ -619,7 +636,7 @@ workflows: - unit_test_cjs: <<: *filter_only_tag npm_command: "test-node" - #- unit_test: + #- unit_test_aot: # <<: *filter_only_tag # name: test_test262 # npm_command: "test-262" @@ -653,6 +670,7 @@ workflows: type: approval - publish_npm: <<: *filter_only_release + name: "publish_npm_latest" channel: latest branch: release requires: diff --git a/package.json b/package.json index ccccd11b87..d6f22c9bca 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,6 @@ "clean:tsconfig-build-cache": "rimraf packages/*/dist/tsconfig.tsbuildinfo packages-cjs/*/dist/tsconfig.tsbuildinfo", "clean:lint": "rimraf .eslintcache packages/*/.eslintcache packages-cjs/*/.eslintcache", "lint": "npm run lint:packages && npm run lint:other", - "lint1": "eslint --ext .ts --quiet --report-unused-disable-directives packages", "lint:other": "eslint --cache --ext .js,.ts scripts", "lint:other:ci": "eslint --cache --ext .js,.ts --quiet --report-unused-disable-directives scripts", "lint:packages": "lage run lint", @@ -83,9 +82,9 @@ "change-tsconfigs:restore": "ts-node -P tsconfig.json scripts/change-tsconfigs.ts restore", "prepare-release": "ts-node -P tsconfig.json scripts/prepare-release.ts", "generate-native-modules": "ts-node -P tsconfig.json scripts/generate-native-modules.ts", - "publish:dev": "ts-node scripts/publish.ts dev", - "publish:latest": "ts-node scripts/publish.ts latest", - "bump-version:dev": "ts-node -P tsconfig.json scripts/bump-version.ts dev", + "publish:dev": "ts-node scripts/publish.ts dev --esm", + "publish:latest": "npx ts-node scripts/publish.ts latest --esm", + "bump-version:dev": "npx ts-node -P tsconfig.json scripts/bump-version.ts dev", "bump-version:latest": "ts-node -P tsconfig.json scripts/bump-version.ts latest", "check-dependencies": "ts-node -P tsconfig.json scripts/check-dependencies.ts", "pregenerate-tests:template-compiler.static": "tsc --resolveJsonModule --module commonjs --moduleResolution node --outDir scripts/dist scripts/generate-tests/template-compiler.static.ts", diff --git a/scripts/publish.js b/scripts/publish.js index 0215de5c73..0ec592eef6 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -8,8 +8,10 @@ const package_json_1 = require("./package.json"); const project_1 = __importDefault(require("./project")); const child_process_1 = require("child_process"); const path_1 = require("path"); +const [, , channel /* dev or latest */] = process.argv; +console.log('Publishing: ' + channel); + (async function () { - const [, , channel /* dev or latest */] = process.argv; for (const { name, folder } of project_1.default.packages .filter(p => !p.name.kebab.includes('_') && p.folder.includes('packages'))) { diff --git a/scripts/publish.ts b/scripts/publish.ts index f25dce41db..bd28f49d10 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -6,6 +6,8 @@ import { join } from 'path'; (async function (): Promise { const [, , channel/* dev or latest */] = process.argv; + console.log(`Publishing for channel: ${channel}`); + for (const { name, folder } of project.packages .filter(