Skip to content

Commit

Permalink
chore: update changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 committed Oct 20, 2024
1 parent 6c83545 commit 2708e30
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"**/binding/**",
"**/templates/**",
"**/dist/**",
"**/docs/**",
"**/node_modules/**",
"**/*.config.js",
"**/*.config.ts"
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
"build:core": "pnpm --filter @farmfe/core build",
"doc": "pnpm --filter farm-docs dev",
"release": "node scripts/release.mjs",
"release:nightly": "node scripts/release-nightly.mjs",
"check": "biome check . --diagnostic-level=warn --apply",
"bump": "node scripts/bump.mjs",
"bump:nightly": "node scripts/bump-nightly.mjs",
"bump:create-farm": "node scripts/bump-create-farm-version.mjs",
"test:rs:update": "cross-env FARM_UPDATE_SNAPSHOTS=1 cargo test -p farmfe_compiler",
"ready": "node scripts/ready.mjs",
Expand All @@ -26,13 +28,13 @@
"test": "cross-env NODE_OPTIONS=--trace-exit vitest run"
},
"devDependencies": {
"@farmfe/core": "workspace:*",
"@farmfe/cli": "workspace:*",
"@biomejs/biome": "1.8.3",
"@changesets/cli": "^2.26.0",
"@codspeed/vitest-plugin": "^3.1.1",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@farmfe/cli": "workspace:*",
"@farmfe/core": "workspace:*",
"@types/node": "22.5.0",
"@vitest/coverage-v8": "2.0.4",
"cross-env": "^7.0.3",
Expand All @@ -41,6 +43,7 @@
"husky": "^9.0.11",
"lint-staged": "^13.0.3",
"nanospinner": "^1.1.0",
"node-emoji": "^2.1.3",
"playwright-chromium": "^1.42.1",
"rimraf": "6.0.1",
"rollup": "^3.29.4",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions scripts/bump-nightly.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { execSync } from "child_process";

// generate nightly version
const dateString =
new Date().getFullYear() +
String(new Date().getMonth() + 1).padStart(2, "0") +
String(new Date().getDate()).padStart(2, "0");

const gitHash = execSync("git rev-parse --short HEAD").toString().trim();

const nightlyVersion = `2.0.0-nightly.${dateString}.${gitHash}`;

execSync(`npx changeset version --snapshot nightly --no-snap-release`, {
stdio: "inherit",
});

execSync(`pnpm --filter "../packages/cli" --filter "../packages/core" version ${nightlyVersion} --no-git-tag-version`, {
stdio: "inherit",
});

execSync("pnpm install --no-frozen-lockfile", { stdio: "inherit" });

console.log(`Nightly version bump completed. Version: ${nightlyVersion}`);
30 changes: 30 additions & 0 deletions scripts/release-nightly.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { execSync } from "child_process";
import { buildCli, buildCoreCjs, buildJsPlugins } from "./build.mjs";

// Generate nightly version number
const dateString =
new Date().getFullYear() +
String(new Date().getMonth() + 1).padStart(2, "0") +
String(new Date().getDate()).padStart(2, "0");

const gitHash = execSync("git rev-parse --short HEAD").toString().trim();

const nightlyVersion = `2.0.0-nightly.${dateString}.${gitHash}`;

// Build node packages
await buildCli();
await buildCoreCjs();
await buildJsPlugins();

// Set npm config to public access
execSync("npm config set access public", { stdio: "inherit" });

// Update versions to nightly
execSync(`npx changeset version --snapshot nightly --no-snap-release`, {
stdio: "inherit",
});

// Publish nightly packages
execSync(`npx changeset publish --tag nightly`, { stdio: "inherit" });

console.log(`Nightly version ${nightlyVersion} published successfully.`);

0 comments on commit 2708e30

Please sign in to comment.