Skip to content

Commit

Permalink
feat(npm/runtime): add @oxc-project/runtime package (#8595)
Browse files Browse the repository at this point in the history
closes #7422
  • Loading branch information
Boshen authored Feb 6, 2025
1 parent a520986 commit 951b2d5
Show file tree
Hide file tree
Showing 236 changed files with 6,736 additions and 4 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release_runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release @oxc-project/runtime

permissions: {}

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})"
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 951b2d5

Please sign in to comment.