diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000000..4cf48efdee5780 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,404 @@ +version: 2 +enable-beta-ecosystems: true + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_allocator" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_ast" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_cli" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_codegen" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_diagnostics" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_index" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_js_regex" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_language_server" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_linter" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/bundled-dependencies/as-array-bundle-deps" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/bundled-dependencies/as-object" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/bundled-dependencies/race-condition" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/empty" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/internal-modules" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/missing-entrypoint" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/monorepo" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/monorepo/packages/nested-package" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/no-unused-modules/binObject" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/no-unused-modules/browserObject" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/no-unused-modules" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/no-unused-modules/privatePkg" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/order-redirect-scoped/module" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/order-redirect-scoped" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/order-redirect/module" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/order-redirect" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/package-named" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/package-scoped" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/package" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/symlinked-module" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/with-flow-typed" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/crates/oxc_linter/fixtures/import/with-typescript-dev-dependencies" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "cargo" + directory: "/crates/oxc_macros" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_minifier" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_module_lexer" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_parser" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_prettier" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_semantic" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_sourcemap" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_span" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_syntax" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_transformer" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/crates/oxc_wasm" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "npm" + directory: "/editors/vscode" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "cargo" + directory: "/fuzz" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/napi/parser" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "npm" + directory: "/napi/parser" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/npm/oxc-parser" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/npm/oxc" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/npm/oxlint" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "cargo" + directory: "/tasks/benchmark" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "npm" + directory: "/tasks/benchmark/codspeed" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "cargo" + directory: "/tasks/common" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/tasks/coverage" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "npm" + directory: "/tasks/coverage/Source/runtime" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "cargo" + directory: "/tasks/javascript_globals" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "npm" + directory: "/tasks/lint_rules" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "cargo" + directory: "/tasks/minsize" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/tasks/prettier_conformance" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/tasks/rulegen" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/tasks/transform_conformance" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "cargo" + directory: "/wasm/parser" + schedule: + interval: "daily" + versioning-strategy: lockfile-only + + - package-ecosystem: "npm" + directory: "/wasm/parser" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/website" + schedule: + interval: "daily" + versioning-strategy: increase diff --git a/.github/workflows/Dependabot.yml b/.github/workflows/Dependabot.yml new file mode 100644 index 00000000000000..cfa5b967573938 --- /dev/null +++ b/.github/workflows/Dependabot.yml @@ -0,0 +1,45 @@ +name: Dependabot + +concurrency: + group: Dependabot-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + pull_request: + +jobs: + Approve: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.0.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + Merge: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.0.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/GitHub.yml b/.github/workflows/GitHub.yml new file mode 100644 index 00000000000000..0be30bac9345a5 --- /dev/null +++ b/.github/workflows/GitHub.yml @@ -0,0 +1,57 @@ +name: GitHub + +concurrency: + group: GitHub-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + issues: write + pull-requests: write + +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + Assign: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + + steps: + - uses: pozil/auto-assign-issue@v1.14.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + assignees: NikolaRHristov + numOfAssignee: 1 diff --git a/.github/workflows/NPM.yml b/.github/workflows/NPM.yml new file mode 100644 index 00000000000000..b64be219e60ab0 --- /dev/null +++ b/.github/workflows/NPM.yml @@ -0,0 +1,331 @@ +name: NPM + +concurrency: + group: NPM-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + release: + types: [created] + workflow_call: + +jobs: + Publish: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4.1.2 + + - uses: actions/setup-node@v4.0.2 + with: + node-version: "18" + registry-url: "https://registry.npmjs.org" + + - run: npm install -g npm + + - name: Publish ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-array-bundle-deps + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-array-bundle-deps + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-object + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-object + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/bundled-dependencies/race-condition + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/bundled-dependencies/race-condition + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/empty + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/empty + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/internal-modules + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/internal-modules + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/missing-entrypoint + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/missing-entrypoint + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/monorepo + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/monorepo + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/monorepo/packages/nested-package + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/monorepo/packages/nested-package + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/no-unused-modules/binObject + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules/binObject + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/no-unused-modules/browserObject + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules/browserObject + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/no-unused-modules + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/no-unused-modules/privatePkg + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules/privatePkg + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/order-redirect-scoped/module + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect-scoped/module + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/order-redirect-scoped + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect-scoped + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/order-redirect/module + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect/module + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/order-redirect + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/package-named + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/package-named + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/package-scoped + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/package-scoped + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/package + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/package + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/symlinked-module + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/symlinked-module + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/with-flow-typed + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/with-flow-typed + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./crates/oxc_linter/fixtures/import/with-typescript-dev-dependencies + continue-on-error: true + working-directory: ./crates/oxc_linter/fixtures/import/with-typescript-dev-dependencies + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./editors/vscode + continue-on-error: true + working-directory: ./editors/vscode + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./napi/parser + continue-on-error: true + working-directory: ./napi/parser + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./npm/oxc-parser + continue-on-error: true + working-directory: ./npm/oxc-parser + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./npm/oxc + continue-on-error: true + working-directory: ./npm/oxc + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./npm/oxlint + continue-on-error: true + working-directory: ./npm/oxlint + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./tasks/benchmark/codspeed + continue-on-error: true + working-directory: ./tasks/benchmark/codspeed + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./tasks/coverage/Source/runtime + continue-on-error: true + working-directory: ./tasks/coverage/Source/runtime + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./tasks/lint_rules + continue-on-error: true + working-directory: ./tasks/lint_rules + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./wasm/parser + continue-on-error: true + working-directory: ./wasm/parser + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./website + continue-on-error: true + working-directory: ./website + run: | + npm install --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/Node.yml b/.github/workflows/Node.yml new file mode 100644 index 00000000000000..dbeae3906ec995 --- /dev/null +++ b/.github/workflows/Node.yml @@ -0,0 +1,668 @@ +name: Node + +concurrency: + group: Node-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + push: + branches: [Current] + pull_request: + branches: [Current] + workflow_call: + +jobs: + Pre-Publish: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + + strategy: + matrix: + node-version: [18, 19, 20] + + steps: + - uses: actions/checkout@v4.1.2 + + - uses: pnpm/action-setup@v3.0.0 + with: + version: 8.15.5 + run_install: | + - recursive: true + args: [ + --link-workspace-packages=true, + --lockfile-only, + --prefer-frozen-lockfile=false, + --shamefully-hoist=false, + --shared-workspace-lockfile=true, + --strict-peer-dependencies=false, + --unsafe-perm=true + ] + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-array-bundle-deps/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-array-bundle-deps + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-bundled-dependencies-as-array-bundle-deps-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-array-bundle-deps/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-object/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-object + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-bundled-dependencies-as-object-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/bundled-dependencies/as-object/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/bundled-dependencies/race-condition/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/bundled-dependencies/race-condition + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-bundled-dependencies-race-condition-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/bundled-dependencies/race-condition/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/empty/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/empty + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-empty-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/empty/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/internal-modules/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/internal-modules + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-internal-modules-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/internal-modules/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/missing-entrypoint/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/missing-entrypoint + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-missing-entrypoint-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/missing-entrypoint/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/monorepo/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/monorepo + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-monorepo-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/monorepo/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/monorepo/packages/nested-package/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/monorepo/packages/nested-package + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-monorepo-packages-nested-package-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/monorepo/packages/nested-package/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/no-unused-modules/binObject/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules/binObject + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-no-unused-modules-binObject-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/no-unused-modules/binObject/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/no-unused-modules/browserObject/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules/browserObject + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-no-unused-modules-browserObject-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/no-unused-modules/browserObject/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/no-unused-modules/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-no-unused-modules-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/no-unused-modules/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/no-unused-modules/privatePkg/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/no-unused-modules/privatePkg + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-no-unused-modules-privatePkg-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/no-unused-modules/privatePkg/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/order-redirect-scoped/module/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect-scoped/module + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-order-redirect-scoped-module-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/order-redirect-scoped/module/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/order-redirect-scoped/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect-scoped + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-order-redirect-scoped-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/order-redirect-scoped/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/order-redirect/module/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect/module + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-order-redirect-module-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/order-redirect/module/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/order-redirect/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/order-redirect + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-order-redirect-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/order-redirect/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/package-named/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/package-named + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-package-named-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/package-named/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/package-scoped/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/package-scoped + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-package-scoped-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/package-scoped/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/package/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/package + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-package-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/package/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/symlinked-module/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/symlinked-module + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-symlinked-module-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/symlinked-module/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/with-flow-typed/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/with-flow-typed + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-with-flow-typed-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/with-flow-typed/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./crates/oxc_linter/fixtures/import/with-typescript-dev-dependencies/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./crates/oxc_linter/fixtures/import/with-typescript-dev-dependencies + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-crates-oxc_linter-fixtures-import-with-typescript-dev-dependencies-Node-${{ matrix.node-version }}-Target + path: ./crates/oxc_linter/fixtures/import/with-typescript-dev-dependencies/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./editors/vscode/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./editors/vscode + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-editors-vscode-Node-${{ matrix.node-version }}-Target + path: ./editors/vscode/Target + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-editors-vscode-Node-${{ matrix.node-version }}-Target + path: ./editors/vscode/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./napi/parser/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./napi/parser + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-napi-parser-Node-${{ matrix.node-version }}-Target + path: ./napi/parser/Target + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-napi-parser-Node-${{ matrix.node-version }}-Target + path: ./napi/parser/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./npm/oxc-parser/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./npm/oxc-parser + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-npm-oxc-parser-Node-${{ matrix.node-version }}-Target + path: ./npm/oxc-parser/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./npm/oxc/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./npm/oxc + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-npm-oxc-Node-${{ matrix.node-version }}-Target + path: ./npm/oxc/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./npm/oxlint/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./npm/oxlint + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-npm-oxlint-Node-${{ matrix.node-version }}-Target + path: ./npm/oxlint/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./tasks/benchmark/codspeed/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./tasks/benchmark/codspeed + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-tasks-benchmark-codspeed-Node-${{ matrix.node-version }}-Target + path: ./tasks/benchmark/codspeed/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./tasks/coverage/Source/runtime/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./tasks/coverage/Source/runtime + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-tasks-coverage-Source-runtime-Node-${{ matrix.node-version }}-Target + path: ./tasks/coverage/Source/runtime/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./tasks/lint_rules/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./tasks/lint_rules + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-tasks-lint_rules-Node-${{ matrix.node-version }}-Target + path: ./tasks/lint_rules/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./wasm/parser/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./wasm/parser + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-wasm-parser-Node-${{ matrix.node-version }}-Target + path: ./wasm/parser/Target + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-wasm-parser-Node-${{ matrix.node-version }}-Target + path: ./wasm/parser/Target + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./website/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./website + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-website-Node-${{ matrix.node-version }}-Target + path: ./website/Target + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.1 + with: + name: .-website-Node-${{ matrix.node-version }}-Target + path: ./website/Target diff --git a/.github/workflows/Rust.yml b/.github/workflows/Rust.yml new file mode 100644 index 00000000000000..4f4e8bfebef9d8 --- /dev/null +++ b/.github/workflows/Rust.yml @@ -0,0 +1,558 @@ +name: Rust + +concurrency: + group: Rust-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + +on: + workflow_dispatch: + push: + branches: [Current] + pull_request: + branches: [Current] + workflow_call: + +jobs: + Build: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + + strategy: + matrix: + toolchain: ["stable", "nightly"] + + steps: + - uses: actions/checkout@v4.1.2 + + - uses: actions-rs/toolchain@v1.0.7 + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_allocator/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_allocator/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_ast/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_ast/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_cli/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_cli/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_codegen/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_codegen/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_diagnostics/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_diagnostics/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_index/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_index/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_js_regex/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_js_regex/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_language_server/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_language_server/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_linter/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_linter/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_macros/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_macros/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_minifier/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_minifier/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_module_lexer/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_module_lexer/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_parser/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_parser/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_prettier/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_prettier/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_semantic/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_semantic/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_sourcemap/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_sourcemap/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_span/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_span/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_syntax/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_syntax/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_transformer/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_transformer/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./crates/oxc_wasm/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./crates/oxc_wasm/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./fuzz/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./fuzz/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./napi/parser/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./napi/parser/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/benchmark/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/benchmark/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/common/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/common/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/coverage/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/coverage/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/javascript_globals/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/javascript_globals/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/minsize/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/minsize/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/prettier_conformance/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/prettier_conformance/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/rulegen/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/rulegen/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./tasks/transform_conformance/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./tasks/transform_conformance/Cargo.toml + + - uses: actions/cache@v4.0.2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('./wasm/parser/Cargo.toml') }} + - uses: actions-rs/cargo@v1.0.3 + with: + command: build + args: --release --all-features --manifest-path ./wasm/parser/Cargo.toml