diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f517e16004..6206f86e163 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -880,11 +880,14 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Fixup package.json files + run: pnpm run release.fixup-package-json + - name: Commit Build Artifacts if: github.event_name == 'push' env: QWIK_API_TOKEN_GITHUB: ${{ secrets.QWIK_API_TOKEN_GITHUB }} - run: pnpm run qwik-save-artifacts + run: pnpm run qwik-push-build-repos - name: Publish packages for testing if: github.event_name != 'workflow_dispatch' diff --git a/package.json b/package.json index e91556dd29b..913ccf09bf5 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ { "label": "Be lenient in vite versions for prod. v4 is broken, v5 is good", "dependencyTypes": [ - "prod" + "prod", + "peer" ], "dependencies": [ "vite" @@ -230,8 +231,9 @@ "preinstall": "npx only-allow pnpm", "prepare": "simple-git-hooks", "prettier.fix": "prettier --cache --write .", - "qwik-save-artifacts": "tsm ./scripts/qwik-save-artifacts.ts", + "qwik-push-build-repos": "tsm ./scripts/qwik-push-build-repos.ts", "release": "changeset publish", + "release.fixup-package-json": "syncpack fix-mismatches --config syncpack-release-conf.json", "release.pkg-pr-new": "pnpm dlx pkg-pr-new@^0.0.9 publish --compact --pnpm ./packages/qwik ./packages/qwik-city ./packages/eslint-plugin-qwik ./packages/create-qwik", "release.prepare": "pnpm build --prepare-release", "serve": "tsm --inspect --conditions=development starters/dev-server.ts 3300", diff --git a/scripts/qwik-save-artifacts.ts b/scripts/qwik-push-build-repos.ts similarity index 93% rename from scripts/qwik-save-artifacts.ts rename to scripts/qwik-push-build-repos.ts index 383fd56dbcb..dabbdc4ccc2 100644 --- a/scripts/qwik-save-artifacts.ts +++ b/scripts/qwik-push-build-repos.ts @@ -10,19 +10,17 @@ const root = join(__dirname, '..'); const srcRepoRef = 'https://github.com/QwikDev/qwik/commit/'; (async () => { - // This replaces the `workspace:^` versions with the actual versions. - await $('npx', 'syncpack', 'fix-mismatches', '-c', '/dev/null'); const finishQwik = await prepare({ buildRepo: 'qwik-build', - artifactsDir: join(root, 'packages', 'qwik', 'dist'), + artifactsDir: join(root, 'packages', 'qwik'), }); const finishQwikCity = await prepare({ buildRepo: 'qwik-city-build', - artifactsDir: join(root, 'packages', 'qwik-city', 'lib'), + artifactsDir: join(root, 'packages', 'qwik-city'), }); const finishCreateQwikCli = await prepare({ buildRepo: 'qwik-create-cli-build', - artifactsDir: join(root, 'packages', 'create-qwik', 'dist'), + artifactsDir: join(root, 'packages', 'create-qwik'), }); const finishQwikLabs = await prepare({ buildRepo: 'qwik-labs-build', @@ -75,7 +73,7 @@ async function prepare({ buildRepo, artifactsDir }: { buildRepo: string; artifac await $( 'cp', '-r', - ...(await expand(artifactsDir, ['.gitignore', 'node_modules'])), + ...(await expand(artifactsDir, ['.gitignore', 'node_modules', 'src'])), buildRepoDir ); await $('cp', join(root, 'CONTINUOUS_BUILD.md'), 'README.md'); diff --git a/syncpack-release-conf.json b/syncpack-release-conf.json new file mode 100644 index 00000000000..077730aed7a --- /dev/null +++ b/syncpack-release-conf.json @@ -0,0 +1,26 @@ +{ + "versionGroups": [ + { + "label": "Require minimums", + "dependencyTypes": ["prod", "peer"], + "range": "^" + } + ], + "semverGroups": [ + { + "label": "Playwright should have the same version as in flake.nix", + "dependencies": ["@playwright/test"], + "pinVersion": "1.47.0" + }, + { + "label": "Undici should always be * until we remove it", + "dependencies": ["undici"], + "range": "*" + }, + { + "label": "use exact version numbers for devDependencies", + "dependencyTypes": ["dev"], + "range": "" + } + ] +}