Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/release_napi_minify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- main
paths:
- npm/oxc-minify/package.json # Please only commit this file, so we don't need to wait for test CI to pass.
- napi/minify/package.json # Please only commit this file, so we don't need to wait for test CI to pass.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_napi_parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- main
paths:
- npm/oxc-parser/package.json # Please only commit this file, so we don't need to wait for test CI to pass.
- napi/parser/package.json # Please only commit this file, so we don't need to wait for test CI to pass.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_napi_transform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- main
paths:
- npm/oxc-transform/package.json # Please only commit this file, so we don't need to wait for test CI to pass.
- napi/transform/package.json # Please only commit this file, so we don't need to wait for test CI to pass.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/reusable_release_napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
static-checking: localIsNew
file-url: https://unpkg.com/oxc-${{ inputs.name }}@latest/package.json
file-name: npm/oxc-${{ inputs.name }}/package.json
file-name: napi/${{ inputs.name }}/package.json

- name: Set version name
if: steps.version.outputs.changed == 'true'
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
id-token: write # for `pnpm publish --provenance`
env:
name: ${{ inputs.name }}
package_json_path: npm/oxc-${{ inputs.name }}/package.json
package_path: napi/${{ inputs.name }}
npm_dir: release-dir
PUBLISH_FLAGS: "--provenance --access public --no-git-checks"
steps:
Expand All @@ -136,15 +136,9 @@ jobs:

- run: mkdir -p release-dir

- run: pnpm napi create-npm-dirs --package-json-path ${package_json_path} --npm-dir ${npm_dir}
- run: pnpm napi create-npm-dirs --package-json-path ${package_path}/package.json --npm-dir ${npm_dir}

- run: pnpm napi artifacts --package-json-path ${package_json_path} --build-output-dir napi/${name} --npm-dir ${npm_dir}

- name: Copy files
run: |
jq -r '.files[]' ${package_json_path} | while read -r file ; do
cp napi/${name}/${file} npm/oxc-${name}/${file}
done
- run: pnpm napi artifacts --package-json-path ${package_path}/package.json --build-output-dir ${package_path} --npm-dir ${npm_dir}

- name: Check Publish
run: |
Expand All @@ -166,24 +160,24 @@ jobs:
done

# Check root package
echo ${package_json_path}
ls npm/oxc-${name}
cat ${package_json_path}
echo ${package_path}
ls ${package_path}
cat ${package_path}/package.json
# Check publish files exist
jq -r '.files[]' ${package_json_path} | while read -r file ; do
if ! [ -f npm/oxc-${name}/$file ]; then
echo "File does not exist." npm/oxc-${name}/$file
jq -r '.files[]' ${package_path}/package.json | while read -r file ; do
if ! [ -f ${package_path}/$file ]; then
echo "File does not exist." ${package_path}/$file
exit 1
fi
done
pnpm publish npm/oxc-${name}/ ${PUBLISH_FLAGS} --dry-run
pnpm publish ${package_path}/ ${PUBLISH_FLAGS} --dry-run

- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
# Publish sub-packages and adds `optionalDependencies` to `package_json_path`.
pnpm napi pre-publish --no-gh-release -t npm --package-json-path ${package_json_path} --npm-dir ${npm_dir}
pnpm publish npm/oxc-${name}/ ${PUBLISH_FLAGS}
# Publish sub-packages and adds `optionalDependencies` to `package_path`.
pnpm napi pre-publish --no-gh-release -t npm --package-json-path ${package_path}/package.json --npm-dir ${npm_dir}
pnpm publish ${package_path}/ ${PUBLISH_FLAGS}
File renamed without changes.
58 changes: 55 additions & 3 deletions napi/minify/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,64 @@
{
"name": "@oxc-minify/binding",
"private": true,
"name": "oxc-minify",
"version": "0.56.5",
"main": "index.js",
"browser": "browser.js",
"scripts": {
"build-dev": "napi build --package-json-path ../../npm/oxc-minify/package.json --no-dts-cache --platform",
"build-dev": "napi build --no-dts-cache --platform",
"build": "pnpm run build-dev --release",
"test": "vitest --typecheck run ./test && tsc"
},
"engines": {
"node": ">=14.0.0"
},
"description": "Oxc Minifier Node API",
"keywords": [
"oxc",
"minify"
],
"author": "Boshen and oxc contributors",
"license": "MIT",
"homepage": "https://oxc.rs",
"bugs": "https://github.com/oxc-project/oxc/issues",
"repository": {
"type": "git",
"url": "https://github.com/oxc-project/oxc.git",
"directory": "napi/minify"
},
"funding": {
"url": "https://github.com/sponsors/Boshen"
},
"files": [
"index.d.ts",
"index.js",
"browser.js"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"devDependencies": {
"vitest": "catalog:"
},
"napi": {
"binaryName": "minify",
"packageName": "@oxc-minify/binding",
"targets": [
"x86_64-pc-windows-msvc",
"aarch64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"armv7-unknown-linux-gnueabihf",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"wasm32-wasip1-threads"
],
"wasm": {
"browser": {
"fs": true
}
}
}
}
File renamed without changes.
62 changes: 59 additions & 3 deletions napi/parser/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,73 @@
{
"name": "@oxc-parser/binding",
"private": true,
"name": "oxc-parser",
"version": "0.56.5",
"main": "index.js",
"browser": "browser.js",
"scripts": {
"build-dev": "napi build --package-json-path ../../npm/oxc-parser/package.json --no-dts-cache --platform --js bindings.js",
"build-dev": "napi build --no-dts-cache --platform --js bindings.js",
"build": "pnpm run build-dev --release",
"test": "vitest --typecheck run ./test && tsc",
"bench": "vitest bench --run ./bench.bench.mjs"
},
"engines": {
"node": ">=14.0.0"
},
"description": "Oxc Parser Node API",
"keywords": [
"oxc",
"parser"
],
"author": "Boshen and oxc contributors",
"license": "MIT",
"homepage": "https://oxc.rs",
"bugs": "https://github.com/oxc-project/oxc/issues",
"repository": {
"type": "git",
"url": "https://github.com/oxc-project/oxc.git",
"directory": "napi/parser"
},
"funding": {
"url": "https://github.com/sponsors/Boshen"
},
"files": [
"index.d.ts",
"index.js",
"browser.js",
"bindings.js",
"deserialize-js.js",
"deserialize-ts.js"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"dependencies": {
"@oxc-project/types": "workspace:^"
},
"devDependencies": {
"@codspeed/vitest-plugin": "^4.0.0",
"vitest": "catalog:"
},
"napi": {
"binaryName": "parser",
"packageName": "@oxc-parser/binding",
"targets": [
"x86_64-pc-windows-msvc",
"aarch64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"armv7-unknown-linux-gnueabihf",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"wasm32-wasip1-threads"
],
"wasm": {
"browser": {
"fs": true
}
},
"dtsHeaderFile": "header.js"
}
}
File renamed without changes.
58 changes: 55 additions & 3 deletions napi/transform/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,64 @@
{
"name": "@oxc-transform/binding",
"private": true,
"name": "oxc-transform",
"version": "0.56.5",
"main": "index.js",
"browser": "browser.js",
"scripts": {
"build-dev": "napi --package-json-path ../../npm/oxc-transform/package.json --no-dts-cache build --platform",
"build-dev": "napi --no-dts-cache build --platform",
"build": "pnpm run build-dev --release",
"test": "vitest --typecheck run ./test && tsc"
},
"engines": {
"node": ">=14.0.0"
},
"description": "Oxc Transformer Node API",
"keywords": [
"oxc",
"transform"
],
"author": "Boshen and oxc contributors",
"license": "MIT",
"homepage": "https://oxc.rs",
"bugs": "https://github.com/oxc-project/oxc/issues",
"repository": {
"type": "git",
"url": "https://github.com/oxc-project/oxc.git",
"directory": "napi/transform"
},
"funding": {
"url": "https://github.com/sponsors/Boshen"
},
"files": [
"index.d.ts",
"index.js",
"browser.js"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"devDependencies": {
"vitest": "catalog:"
},
"napi": {
"binaryName": "transform",
"packageName": "@oxc-transform/binding",
"targets": [
"x86_64-pc-windows-msvc",
"aarch64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"armv7-unknown-linux-gnueabihf",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"wasm32-wasip1-threads"
],
"wasm": {
"browser": {
"fs": true
}
}
}
}
18 changes: 0 additions & 18 deletions npm/oxc-minify/CHANGELOG.md

This file was deleted.

56 changes: 0 additions & 56 deletions npm/oxc-minify/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions npm/oxc-parser/.gitignore

This file was deleted.

Loading
Loading