From 3316497cab266ea44698eec38ba8eb062b06c8b4 Mon Sep 17 00:00:00 2001 From: Dwlad90 Date: Mon, 30 Sep 2024 23:30:28 +0300 Subject: [PATCH] chore: bump version to 0.3.0-rc.1 --- .github/workflows/napi.yml | 34 +++--- .github/workflows/pre-release.yml | 12 +- apps/nextjs-example/package.json | 6 +- apps/nextjs-swc-example/package.json | 6 +- crates/stylex-path-resolver/Cargo.toml | 2 +- crates/stylex-path-resolver/package.json | 2 +- crates/stylex-rs-compiler/Cargo.toml | 2 +- .../npm/darwin-arm64/package.json | 2 +- .../npm/darwin-x64/package.json | 2 +- .../npm/linux-arm64-gnu/package.json | 2 +- .../npm/linux-x64-gnu/package.json | 2 +- .../npm/linux-x64-musl/package.json | 2 +- .../npm/win32-x64-msvc/package.json | 2 +- crates/stylex-rs-compiler/package.json | 106 +++++++++--------- crates/stylex-shared/Cargo.toml | 2 +- crates/stylex-shared/package.json | 14 +-- crates/stylex-swc-plugin/Cargo.toml | 2 +- crates/stylex-swc-plugin/package.json | 2 +- crates/stylex-test-parser/Cargo.toml | 2 +- crates/stylex-test-parser/package.json | 2 +- package.json | 2 +- packages/eslint-config/package.json | 2 +- packages/nextjs-plugin/package.json | 4 +- packages/nextjs-swc-plugin/package.json | 2 +- packages/typescript-config/package.json | 2 +- 25 files changed, 113 insertions(+), 105 deletions(-) diff --git a/.github/workflows/napi.yml b/.github/workflows/napi.yml index bcf36aa7..930d8992 100644 --- a/.github/workflows/napi.yml +++ b/.github/workflows/napi.yml @@ -304,20 +304,20 @@ jobs: run: | sed -i "s|require('@stylexswc/rs-compiler-[^']*')|require('@stylexswc/rs-compiler')|g" crates/stylex-rs-compiler/dist/index.js shell: bash - # - name: Publish - # run: | - # npm config set provenance true - # if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; - # then - # echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - # npm publish --access public - # elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+"; - # then - # echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - # npm publish --tag next --access public - # else - # echo "Not a release, skipping publish" - # fi - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish + run: | + if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; + then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + pnpm publish -r --access public + elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+"; + then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + pnpm publish -r --tag next --access public + else + echo "Not a release, skipping publish" + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 01b6e3b3..9b406d8a 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -4,17 +4,25 @@ on: push: tags: - "*.*.*" - + - "*.*.*-*.*" jobs: generate-pre-release: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + - name: Set prerelease variable + id: prerelease + run: | + if [[ "${GITHUB_REF#refs/tags/}" == *-* ]]; then + echo "::set-output name=prerelease::true" + else + echo "::set-output name=prerelease::false" + fi - name: Release uses: softprops/action-gh-release@v2 with: - prerelease: false + prerelease: ${{ steps.prerelease.outputs.prerelease }} generate_release_notes: true draft: true fail_on_unmatched_files: true \ No newline at end of file diff --git a/apps/nextjs-example/package.json b/apps/nextjs-example/package.json index ba7d0e94..3bcbd2fe 100644 --- a/apps/nextjs-example/package.json +++ b/apps/nextjs-example/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/next-example", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "scripts": { "clean": "rimraf .next", @@ -22,8 +22,8 @@ }, "devDependencies": { "@stylexjs/eslint-plugin": "^0.7.5", - "@stylexswc/nextjs-plugin": "0.2.4", - "@stylexswc/rs-compiler": "0.2.4", + "@stylexswc/nextjs-plugin": "0.3.0-rc.1", + "@stylexswc/rs-compiler": "0.3.0-rc.1", "@types/node": "^20.10.4", "@types/react": "^18.2.45", "@types/react-dom": "^18.2.18", diff --git a/apps/nextjs-swc-example/package.json b/apps/nextjs-swc-example/package.json index 89b14547..b387d429 100644 --- a/apps/nextjs-swc-example/package.json +++ b/apps/nextjs-swc-example/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/next-example", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "scripts": { "clean": "rimraf .next", @@ -22,8 +22,8 @@ }, "devDependencies": { "@stylexjs/eslint-plugin": "^0.7.5", - "@stylexswc/nextjs-swc-plugin": "0.2.4", - "@stylexswc/swc-plugin": "0.2.4", + "@stylexswc/nextjs-swc-plugin": "0.3.0-rc.1", + "@stylexswc/swc-plugin": "0.3.0-rc.1", "@types/node": "^20.10.4", "@types/react": "^18.2.45", "@types/react-dom": "^18.2.18", diff --git a/crates/stylex-path-resolver/Cargo.toml b/crates/stylex-path-resolver/Cargo.toml index f048f7a8..ae94574f 100644 --- a/crates/stylex-path-resolver/Cargo.toml +++ b/crates/stylex-path-resolver/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stylex_path_resolver" -version = "0.2.4" +version = "0.3.0-rc.1" edition = "2021" rust-version = "1.80.0" description = "Path resolver for StyleX SWC plugin" diff --git a/crates/stylex-path-resolver/package.json b/crates/stylex-path-resolver/package.json index 90c70f4f..15ec6292 100644 --- a/crates/stylex-path-resolver/package.json +++ b/crates/stylex-path-resolver/package.json @@ -1,7 +1,7 @@ { "name": "@stylexswc/path-resolver", "description": "SWC lib for path imports resolving for SWC StyleX plugin", - "version": "0.2.4", + "version": "0.3.0-rc.1", "config": { "scripty": { "path": "../../scripts/packages" diff --git a/crates/stylex-rs-compiler/Cargo.toml b/crates/stylex-rs-compiler/Cargo.toml index 1ef08417..332c1999 100644 --- a/crates/stylex-rs-compiler/Cargo.toml +++ b/crates/stylex-rs-compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stylex_compiler_rs" -version = "0.2.4" +version = "0.3.0-rc.1" edition = "2021" license.workspace = true repository.workspace = true diff --git a/crates/stylex-rs-compiler/npm/darwin-arm64/package.json b/crates/stylex-rs-compiler/npm/darwin-arm64/package.json index 10fb8ede..62ac4e26 100644 --- a/crates/stylex-rs-compiler/npm/darwin-arm64/package.json +++ b/crates/stylex-rs-compiler/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/rs-compiler-darwin-arm64", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "os": [ "darwin" diff --git a/crates/stylex-rs-compiler/npm/darwin-x64/package.json b/crates/stylex-rs-compiler/npm/darwin-x64/package.json index 59fef56c..9cdb92f7 100644 --- a/crates/stylex-rs-compiler/npm/darwin-x64/package.json +++ b/crates/stylex-rs-compiler/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/rs-compiler-darwin-x64", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "os": [ "darwin" diff --git a/crates/stylex-rs-compiler/npm/linux-arm64-gnu/package.json b/crates/stylex-rs-compiler/npm/linux-arm64-gnu/package.json index d712f56c..2a35ea85 100644 --- a/crates/stylex-rs-compiler/npm/linux-arm64-gnu/package.json +++ b/crates/stylex-rs-compiler/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/rs-compiler-linux-arm64-gnu", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "os": [ "linux" diff --git a/crates/stylex-rs-compiler/npm/linux-x64-gnu/package.json b/crates/stylex-rs-compiler/npm/linux-x64-gnu/package.json index d07abc89..257444ba 100644 --- a/crates/stylex-rs-compiler/npm/linux-x64-gnu/package.json +++ b/crates/stylex-rs-compiler/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/rs-compiler-linux-x64-gnu", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "os": [ "linux" diff --git a/crates/stylex-rs-compiler/npm/linux-x64-musl/package.json b/crates/stylex-rs-compiler/npm/linux-x64-musl/package.json index e4ad0da2..5ed5e723 100644 --- a/crates/stylex-rs-compiler/npm/linux-x64-musl/package.json +++ b/crates/stylex-rs-compiler/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/rs-compiler-linux-x64-musl", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "os": [ "linux" diff --git a/crates/stylex-rs-compiler/npm/win32-x64-msvc/package.json b/crates/stylex-rs-compiler/npm/win32-x64-msvc/package.json index 3c4fabe7..8336b209 100644 --- a/crates/stylex-rs-compiler/npm/win32-x64-msvc/package.json +++ b/crates/stylex-rs-compiler/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/rs-compiler-win32-x64-msvc", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "os": [ "win32" diff --git a/crates/stylex-rs-compiler/package.json b/crates/stylex-rs-compiler/package.json index f956f720..ce880510 100644 --- a/crates/stylex-rs-compiler/package.json +++ b/crates/stylex-rs-compiler/package.json @@ -1,25 +1,59 @@ { "name": "@stylexswc/rs-compiler", - "version": "0.2.4", "description": "NAPI-RS compiler for transform StyleX code", - "main": "dist/index.js", - "repository": "https://github.com/Dwlad90/stylex-swc-plugin", - "license": "MIT", - "private": false, + "version": "0.3.0-rc.1", + "ava": { + "extensions": { + "ts": "module" + }, + "timeout": "2m", + "workerThreads": false, + "environmentVariables": { + "TS_NODE_PROJECT": "./tsconfig.json" + }, + "nodeArguments": [ + "--import", + "@swc-node/register/esm-register" + ] + }, + "devDependencies": { + "@napi-rs/cli": "^2.18.4", + "@stylexjs/open-props": "^0.7.5", + "@stylexjs/stylex": "^0.7.5", + "@swc-node/register": "^1.10.6", + "@swc/core": "^1.6.13", + "@taplo/cli": "^0.7.0", + "@types/node": "^20", + "ava": "^6.1.3", + "benchmark": "^2.1.2", + "chalk": "^5.3.0", + "husky": "^9.0.11", + "lint-staged": "^15.2.7", + "npm-run-all2": "^6.2.2", + "oxlint": "^0.9.0", + "prettier": "^3.3.3", + "tinybench": "^2.8.0", + "typescript": "^5.5.3" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist/index.d.ts", + "dist/index.js" + ], "keywords": [ - "napi-rs", - "NAPI", "N-API", - "Rust", + "NAPI", + "napi-rs", "node-addon", "node-addon-api", + "Rust", "StyleX", "SWC" ], - "files": [ - "dist/index.d.ts", - "dist/index.js" - ], + "license": "MIT", + "main": "dist/index.js", "napi": { "name": "rs-compiler", "triples": { @@ -34,13 +68,13 @@ ] } }, - "engines": { - "node": ">= 18" - }, + "packageManager": "pnpm@9.9.0", + "private": false, "publishConfig": { "registry": "https://registry.npmjs.org/", "access": "public" }, + "repository": "https://github.com/Dwlad90/stylex-swc-plugin", "scripts": { "artifacts": "napi artifacts", "bench": "node --import @swc-node/register/esm-register benchmark/bench.ts", @@ -48,45 +82,11 @@ "build:debug": "napi build --platform", "format": "run-p format:prettier format:rs format:toml", "format:prettier": "prettier . -w", - "format:toml": "taplo format", "format:rs": "cargo fmt", + "format:toml": "taplo format", "lint": "oxlint .", - "prepublishOnly": "napi prepublish -t npm", + "prepublishOnly": "napi prepublish --skip-gh-release && git checkout .", "test": "ava", "version": "napi version" - }, - "devDependencies": { - "benchmark": "^2.1.2", - "@stylexjs/open-props": "^0.7.5", - "@stylexjs/stylex": "^0.7.5", - "@napi-rs/cli": "^2.18.4", - "@swc-node/register": "^1.10.6", - "@swc/core": "^1.6.13", - "@taplo/cli": "^0.7.0", - "ava": "^6.1.3", - "chalk": "^5.3.0", - "husky": "^9.0.11", - "lint-staged": "^15.2.7", - "npm-run-all2": "^6.2.2", - "oxlint": "^0.9.0", - "prettier": "^3.3.3", - "tinybench": "^2.8.0", - "typescript": "^5.5.3", - "@types/node": "^20" - }, - "ava": { - "extensions": { - "ts": "module" - }, - "timeout": "2m", - "workerThreads": false, - "environmentVariables": { - "TS_NODE_PROJECT": "./tsconfig.json" - }, - "nodeArguments": [ - "--import", - "@swc-node/register/esm-register" - ] - }, - "packageManager": "pnpm@9.9.0" -} \ No newline at end of file + } +} diff --git a/crates/stylex-shared/Cargo.toml b/crates/stylex-shared/Cargo.toml index 75f231da..561a5b3d 100644 --- a/crates/stylex-shared/Cargo.toml +++ b/crates/stylex-shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stylex_shared" -version = "0.2.4" +version = "0.3.0-rc.1" edition = "2021" rust-version = "1.80.0" description = "Shared SWC tranformer for StyleX" diff --git a/crates/stylex-shared/package.json b/crates/stylex-shared/package.json index 7826db04..d53ec939 100644 --- a/crates/stylex-shared/package.json +++ b/crates/stylex-shared/package.json @@ -1,7 +1,7 @@ { "name": "@stylexswc/shared", "description": "Shared code for stylex-swc-plugin and stylex-rs-compiler", - "version": "0.2.4", + "version": "0.3.0-rc.1", "config": { "scripty": { "path": "../../scripts/packages" @@ -11,11 +11,11 @@ "dist" ], "keywords": [ + "napi", + "napi-rs", "stylex", "swc", - "swc-plugin", - "napi-rs", - "napi" + "swc-plugin" ], "license": "MIT", "private": true, @@ -35,10 +35,10 @@ "precommit": "lint-staged", "prepublishOnly": "pnpm run build", "prepush": "lint-prepush", - "test:rs": "NODE_ENV=test cargo test --lib --bins --tests fixture_", - "test:wasm": "NODE_ENV=test cargo test --lib --bins --tests --features wasm", "test": "pnpm run test:rs && pnpm run test:wasm", - "test:profile": "NODE_ENV=test cargo flamegraph --root --test" + "test:profile": "NODE_ENV=test cargo flamegraph --root --test", + "test:rs": "NODE_ENV=test cargo test --lib --bins --tests fixture_", + "test:wasm": "NODE_ENV=test cargo test --lib --bins --tests --features wasm" }, "sideEffects": false } diff --git a/crates/stylex-swc-plugin/Cargo.toml b/crates/stylex-swc-plugin/Cargo.toml index 2330dee6..d6e30f1f 100644 --- a/crates/stylex-swc-plugin/Cargo.toml +++ b/crates/stylex-swc-plugin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stylex_swc_plugin" -version = "0.2.4" +version = "0.3.0-rc.1" edition = "2021" rust-version = "1.80.0" description = "SWC plugin for StyleX" diff --git a/crates/stylex-swc-plugin/package.json b/crates/stylex-swc-plugin/package.json index 09f7c18e..d4810458 100644 --- a/crates/stylex-swc-plugin/package.json +++ b/crates/stylex-swc-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@stylexswc/swc-plugin", "description": "SWC plugin for transforming StyleX code", - "version": "0.2.4", + "version": "0.3.0-rc.1", "config": { "scripty": { "path": "../../scripts/packages" diff --git a/crates/stylex-test-parser/Cargo.toml b/crates/stylex-test-parser/Cargo.toml index c461f49e..eef532bc 100644 --- a/crates/stylex-test-parser/Cargo.toml +++ b/crates/stylex-test-parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stylex_test_parser" -version = "0.2.4" +version = "0.3.0-rc.1" edition = "2021" rust-version = "1.80.0" description = "Test parser for StyleX" diff --git a/crates/stylex-test-parser/package.json b/crates/stylex-test-parser/package.json index bc065803..9fa53757 100644 --- a/crates/stylex-test-parser/package.json +++ b/crates/stylex-test-parser/package.json @@ -1,7 +1,7 @@ { "name": "@stylexswc/test-parser", "description": "Parse origin jest stylex test files", - "version": "0.2.4", + "version": "0.3.0-rc.1", "config": { "scripty": { "path": "../../scripts/packages" diff --git a/package.json b/package.json index e2e244e2..a0e9302d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/stylexswc", - "version": "0.2.4", + "version": "0.3.0-rc.1", "private": true, "scripts": { "build": "turbo build", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index f55b90c7..149a3eb8 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/eslint-config", - "version": "0.2.4", + "version": "0.3.0-rc.1", "dependencies": { "eslint": "^8.57.0" }, diff --git a/packages/nextjs-plugin/package.json b/packages/nextjs-plugin/package.json index b9237165..80d48710 100644 --- a/packages/nextjs-plugin/package.json +++ b/packages/nextjs-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@stylexswc/nextjs-plugin", "description": "Stylex NextJS plugin with NAPI-RS compiler", - "version": "0.2.4", + "version": "0.3.0-rc.1", "config": { "scripty": { "path": "../../scripts/packages" @@ -9,8 +9,8 @@ }, "devDependencies": { "@babel/types": "^7.23.9", - "@stylexswc/rs-compiler": "workspace:*", "@stylexswc/eslint-config": "workspace:*", + "@stylexswc/rs-compiler": "workspace:*", "@stylexswc/typescript-config": "workspace:*", "@types/babel__core": "^7.20.5", "@types/node": "^20.12.11", diff --git a/packages/nextjs-swc-plugin/package.json b/packages/nextjs-swc-plugin/package.json index af8a251f..484bc087 100644 --- a/packages/nextjs-swc-plugin/package.json +++ b/packages/nextjs-swc-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@stylexswc/nextjs-swc-plugin", "description": "Stylex NextJS plugin with swc plugin", - "version": "0.2.4", + "version": "0.3.0-rc.1", "config": { "scripty": { "path": "../../scripts/packages" diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json index b108b89b..a7f0d795 100644 --- a/packages/typescript-config/package.json +++ b/packages/typescript-config/package.json @@ -1,6 +1,6 @@ { "name": "@stylexswc/typescript-config", - "version": "0.2.4", + "version": "0.3.0-rc.1", "license": "MIT", "private": true, "publishConfig": {