Skip to content

Commit

Permalink
feat(npm/runtime): add @oxc-project/runtime package
Browse files Browse the repository at this point in the history
closes #7422
  • Loading branch information
Boshen committed Jan 19, 2025
1 parent 066ffe8 commit 30ccf3d
Show file tree
Hide file tree
Showing 236 changed files with 6,734 additions and 4 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release_runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release @oxc-project/runtime

on:
workflow_dispatch:
push:
branches:
- main
paths:
- npm/runtime/package.json

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: Check version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
version_changed: ${{ steps.version.outputs.changed }}
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

- name: Check version changes
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425 # v2
id: version
with:
static-checking: localIsNew
file-url: https://unpkg.com/@oxc-project/runtime/package.json
file-name: npm/runtime/package.json

- name: Set version name
if: steps.version.outputs.changed == 'true'
env:
VERSION_NUMBER: ${{ steps.version.outputs.version }}
VERSION_TYPE: ${{ steps.version.outputs.version_type }}
run: |
echo "Version change found! New version: ${VERSION_NUMBER} (${VERSION_TYPE})"

Check warning

Code scanning / zizmor

overly broad permissions Warning

overly broad permissions
build:
needs: check
if: needs.check.outputs.version_changed == 'true'
name: Release @oxc-project/runtime
runs-on: ubuntu-latest
permissions:
id-token: write # for `pnpm publish --provenance`
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

- uses: ./.github/actions/pnpm

- name: Publish
working-directory: npm/oxc-runtime
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --provenance --access public --no-git-checks
1 change: 1 addition & 0 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"npm/*/package.json",
"npm/oxlint/configuration_schema.json",
"npm/oxc-wasm/**",
"npm/runtime/src",
".github/.generated_ast_watch_list.yml"
],
"plugins": [
Expand Down
5 changes: 5 additions & 0 deletions npm/runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Oxc's modular runtime helpers

Code copied from the published package `@babel/runtime`.

All credits to the Babel team.
Loading

0 comments on commit 30ccf3d

Please sign in to comment.