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

fix(ci): keep ^ in release deps and fix build repos #7017

Merged
merged 1 commit into from
Oct 30, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
{
"label": "Be lenient in vite versions for prod. v4 is broken, v5 is good",
"dependencyTypes": [
"prod"
"prod",
"peer"
],
"dependencies": [
"vite"
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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');
Expand Down
26 changes: 26 additions & 0 deletions syncpack-release-conf.json
Original file line number Diff line number Diff line change
@@ -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": ""
}
]
}