diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 7876c02ef..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -open_collective: parcel diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md deleted file mode 100644 index 9db8d6ff9..000000000 --- a/.github/ISSUE_TEMPLATE/Bug_Report.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -name: 🐛 Bug Report -about: Did something not work as expected? ---- - - - -# 🐛 bug report - - - -## 🎛 Configuration (.babelrc, package.json, cli command) - - - -```js -{ - "your": { "config": "here" } -} -``` - -## 🤔 Expected Behavior - - - -## 😯 Current Behavior - - - - - -## 💁 Possible Solution - - - -## 🔦 Context - - - - - -## 💻 Code Sample - - - -## 🌍 Your Environment - - - -| Software | Version(s) | -| ---------------- | ---------- | -| Parcel | -| Node | -| npm/Yarn | -| Operating System | - - diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md deleted file mode 100644 index 0756a0ebc..000000000 --- a/.github/ISSUE_TEMPLATE/Feature_Request.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: 🙋 Feature Request -about: Want us to add something to parcel? ---- - - - -# 🙋 feature request - - - -## 🤔 Expected Behavior - - - -## 😯 Current Behavior - - - -## 💁 Possible Solution - - - -## 🔦 Context - - - - - -## 💻 Examples - - - - diff --git a/.github/ISSUE_TEMPLATE/RFC.md b/.github/ISSUE_TEMPLATE/RFC.md deleted file mode 100644 index df884a0a3..000000000 --- a/.github/ISSUE_TEMPLATE/RFC.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: 💬 Request For Comment (RFC) -about: Feature discussion ---- - - - -# 💬 RFC - - - -## 🔦 Context - - - - - -## 💻 Examples - - - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index d41e9b493..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask a question - url: https://github.com/parcel-bundler/parcel/discussions - about: Please ask and answer questions here. - - name: Documentation - url: https://github.com/parcel-bundler/website - about: Contribute and suggest documentation here. - diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml index 0d06fffde..7b6468572 100644 --- a/.github/workflows/canary-release.yml +++ b/.github/workflows/canary-release.yml @@ -1,17 +1,18 @@ # This workflow builds and releases all packages on the main branch with a canary # dist tag. These packages contain changes that are not yet available in a publicly -# released version of Parcel. -name: canary-release +# released version of Atlaspack. +name: Canary Release on: push: branches: - - v2 + - main workflow_dispatch: jobs: build-and-release: name: Build and release canary + if: false uses: ./.github/workflows/release.yml secrets: inherit with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14cfac25d..f140db01f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: pull_request: push: branches: - - v2 + - main permissions: contents: read @@ -23,8 +23,6 @@ jobs: with: toolchain: stable components: rustfmt - # use `--frozen-lockfile` to fail immediately if the committed yarn.lock needs updates - # https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile - run: yarn --frozen-lockfile - run: yarn lint @@ -50,21 +48,12 @@ jobs: - run: yarn --frozen-lockfile - run: yarn build-ts - benchmarks: - name: Benchmarks - runs-on: ubuntu-latest - steps: - - name: PR Benchmarks - uses: parcel-bundler/parcel-benchmark-action@master - env: - PARCEL_BENCHMARK_APIKEY: ${{ secrets.PARCEL_BENCHMARK_APIKEY }} - unit_tests: name: Unit tests (${{ matrix.os }}, Node ${{ matrix.node }}) strategy: matrix: node: [18, 20] - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -84,7 +73,7 @@ jobs: - run: yarn --frozen-lockfile - run: yarn build-native-release - run: yarn test:unit - - name: Upload @parcel/rust artifacts on Linux with Node v20 + - name: Upload @atlaspack/rust artifacts on Linux with Node v20 if: ${{ runner.os == 'Linux' && matrix.node == 20 }} uses: actions/upload-artifact@v3 with: @@ -99,7 +88,7 @@ jobs: strategy: matrix: node: [18, 20] - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] version: [v2, v3] # These tend to be quite flakey, so one failed instance shouldn't stop # others from potentially succeeding @@ -125,76 +114,17 @@ jobs: - run: yarn build - run: yarn test:integration-ci env: - PARCEL_V3: ${{ matrix.version == 'v3' && 'true' || 'false' }} + ATLASPACK_V3: ${{ matrix.version == 'v3' && 'true' || 'false' }} - # Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml - repl_build: - name: Build REPL - if: ${{ github.event_name == 'pull_request' }} - runs-on: ubuntu-latest + repl: + name: Deploy REPL + if: false # ${{ github.event_name == 'pull_request' }} + uses: ./.github/workflows/repl.yml permissions: + contents: read deployments: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - targets: wasm32-unknown-unknown - - name: Install wasm-opt - run: | - curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz - tar -xf binaryen-version_116-x86_64-linux.tar.gz - echo "$PWD/binaryen-version_116/bin" >> $GITHUB_PATH - - uses: Swatinem/rust-cache@v2 - with: - key: wasm - - name: Bump max inotify watches - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p; - - run: yarn --frozen-lockfile - - name: Build native packages - run: yarn build-native-release - - run: yarn build - - run: yarn build-native-wasm - - run: yarn workspace @parcel/repl build - # - name: Upload REPL - # uses: actions/upload-artifact@v3 - # with: - # name: REPL - # path: 'packages/dev/repl/dist' - - name: Start Deployment - uses: bobheadxi/deployments@v1 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.head_ref }} - env: Preview - override: false - - name: Deploy to Vercel - uses: amondnet/vercel-action@v25 - id: vercel-action - with: - vercel-token: ${{ secrets.REPL_VERCEL_TOKEN }} - vercel-org-id: ${{ secrets.REPL_VERCEL_ORG_ID }} - vercel-project-id: ${{ secrets.REPL_VERCEL_PROJECT_ID }} - github-comment: false - working-directory: packages/dev/repl - # vercel-args: '--prod' - scope: parcel - alias-domains: | - pr-{{PR_NUMBER}}.repl.parceljs.org - - name: Update Deployment Status - uses: bobheadxi/deployments@v1 - if: always() - with: - step: finish - token: ${{ secrets.GITHUB_TOKEN }} - env: Preview - override: false - status: ${{ job.status }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - env_url: ${{ steps.vercel-action.outputs.preview-url }} + secrets: inherit + with: + alias-domains: | + pr-{{PR_NUMBER}}.repl.atlaspack.org + environment: Preview diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 6cab843e7..ed212e524 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -1,7 +1,7 @@ # This workflow builds and releases all packages with a dev dist tag. Once published, # the packages can be installed to streamline the testing and validation of changes, both # locally and within CI, that have not yet been approved or merged into the main branch. -name: dev-release +name: Development Release on: workflow_dispatch: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be3bc6e07..8a067a202 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: release +name: Release on: workflow_call: @@ -17,8 +17,6 @@ on: default: 'release' type: string secrets: - GHCR_TOKEN: - required: true NPM_TOKEN: required: true @@ -26,7 +24,7 @@ permissions: contents: read # for actions/checkout jobs: - build-macos-windows: + build-macos: strategy: fail-fast: false matrix: @@ -38,9 +36,6 @@ jobs: - name: x86_64-apple-darwin os: macos-latest target: x86_64-apple-darwin - - - name: windows-latest - os: windows-latest name: ${{ matrix.name }} runs-on: ${{ matrix.os }} steps: @@ -72,7 +67,6 @@ jobs: name: debug-symbols-${{ matrix.name }} path: packages/*/*/*.node.dSYM/Contents/Resources/DWARF/*.node - name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034 - if: ${{ runner.os == 'macOS' }} run: strip -x packages/*/*/*.node # Must use -x on macOS. This produces larger results on linux. - name: Upload artifacts uses: actions/upload-artifact@v3 @@ -80,11 +74,10 @@ jobs: name: bindings-${{ matrix.name }} path: packages/*/*/*.node - name: Debug - if: ${{ runner.os == 'macOS' }} run: ls -l packages/*/*/*.node - name: Smoke test if: ${{ !matrix.target }} - run: node -e "require('@parcel/rust')" + run: node -e "require('@atlaspack/rust')" build-linux-gnu-x64: name: linux-gnu-x64 @@ -124,7 +117,7 @@ jobs: - name: debug run: ls -l packages/*/*/*.node - name: Smoke test - run: node -e 'require("@parcel/rust")' + run: node -e 'require("@atlaspack/rust")' build-linux-gnu-arm: strategy: @@ -192,78 +185,15 @@ jobs: with: image: ghcr.io/devongovett/multiarch-node:node14-${{ matrix.arch }}-focal options: -v ${{github.workspace}}:/work - run: cd /work && node -e "require('@parcel/rust')" - - build-linux-musl: - strategy: - fail-fast: false - matrix: - include: - - target: x86_64-unknown-linux-musl - strip: strip - objcopy: objcopy - cflags: -msse4.2 - arch: x86_64 - - target: aarch64-unknown-linux-musl - strip: aarch64-linux-musl-strip - objcopy: aarch64-linux-musl-objcopy - cflags: '' - arch: aarch64 - name: ${{ matrix.target }} - runs-on: ubuntu-20.04 - container: - image: ghcr.io/napi-rs/napi-rs/nodejs-rust@sha256:5a99e45446355d25c20e95d35231d84e9ce472280d8c0b1be53281bade905f09 - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GHCR_TOKEN }} - steps: - - uses: actions/checkout@v4 - - name: Install build tools - run: apk add --no-cache python3 make gcc g++ musl-dev curl openssl - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - target: ${{ matrix.target }} - - uses: bahmutov/npm-install@v1.8.35 - - name: Build native packages - run: yarn build-native-${{ inputs.profile }} - env: - RUST_TARGET: ${{ matrix.target }} - CFLAGS: ${{ matrix.cflags }} - - name: Extract debug symbols - if: ${{ inputs.profile == 'canary' }} - run: | - find packages -name "*.node" -type f -exec ${{ matrix.objcopy }} --only-keep-debug --compress-debug-sections=zlib {} {}.debug \; - find packages -name "*.node" -type f -exec ${{ matrix.objcopy }} --strip-debug --strip-unneeded {} \; - find packages -name "*.node" -type f -exec ${{ matrix.objcopy }} --add-gnu-debuglink={}.debug {} \; - - name: Upload debug symbols - uses: actions/upload-artifact@v3 - if: ${{ inputs.profile == 'canary' }} - with: - name: debug-symbols-linux-musl-${{ matrix.arch }} - path: packages/*/*/*.node.debug - - name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034 - run: ${{ matrix.strip }} packages/*/*/*.node - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: bindings-linux-musl-${{ matrix.arch }} - path: packages/*/*/*.node - - name: debug - run: ls -l packages/*/*/*.node - - name: Smoke test - if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }} - run: node -e 'require("@parcel/rust")' + run: cd /work && node -e "require('@atlaspack/rust')" build-and-release: - runs-on: ubuntu-20.04 name: Build and release needs: - build-linux-gnu-arm - build-linux-gnu-x64 - - build-linux-musl - - build-macos-windows + - build-macos + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/repl.yml b/.github/workflows/repl.yml new file mode 100644 index 000000000..2157e8776 --- /dev/null +++ b/.github/workflows/repl.yml @@ -0,0 +1,88 @@ +name: Deploy REPL + +on: + workflow_call: + inputs: + environment: + description: 'The environment to deploy REPL' + required: true + type: string + alias-domains: + description: 'A list of domains used for the REPL deploymnet' + required: false + type: string + secrets: + REPL_VERCEL_TOKEN: + required: true + REPL_VERCEL_ORG_ID: + required: true + REPL_VERCEL_PROJECT_ID: + required: true + +jobs: + # Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml + repl_build: + name: Build REPL + if: false + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + targets: wasm32-unknown-unknown + - name: Install wasm-opt + run: | + curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz + tar -xf binaryen-version_116-x86_64-linux.tar.gz + echo "$PWD/binaryen-version_116/bin" >> $GITHUB_PATH + - uses: Swatinem/rust-cache@v2 + with: + key: wasm + - name: Bump max inotify watches + run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p; + - run: yarn --frozen-lockfile + - name: Build native packages + run: yarn build-native-release + - run: yarn build + - run: yarn build-native-wasm + - run: yarn workspace @atlaspack/repl build + - name: Start Deployment + uses: bobheadxi/deployments@v1 + id: deployment + with: + step: start + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ github.head_ref }} + env: ${{ inputs.environment }} + override: false + - name: Deploy to Vercel + uses: amondnet/vercel-action@v25 + id: vercel-action + with: + alias-domains: ${{ inputs.alias_domains }} + github-comment: false + scope: atlaspack + vercel-args: ${{ inputs.environment == 'Production' && '--prod' || '' }} + vercel-org-id: ${{ secrets.REPL_VERCEL_ORG_ID }} + vercel-project-id: ${{ secrets.REPL_VERCEL_PROJECT_ID }} + vercel-token: ${{ secrets.REPL_VERCEL_TOKEN }} + working-directory: packages/dev/repl + - name: Update Deployment Status + uses: bobheadxi/deployments@v1 + if: always() + with: + step: finish + token: ${{ secrets.GITHUB_TOKEN }} + env: ${{ inputs.environment }} + override: false + status: ${{ job.status }} + deployment_id: ${{ steps.deployment.outputs.deployment_id }} + env_url: ${{ steps.vercel-action.outputs.preview-url }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index e1c0725f4..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: 'Close stale issues' - -on: - schedule: - - cron: '0 */12 * * *' - issue_comment: - types: [created] - -permissions: {} - -jobs: - stale: - permissions: - issues: write # to comment on issues - pull-requests: write # to comment on pull requests - - runs-on: ubuntu-latest - steps: - - uses: DeMoorJasper/stale@master - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-label: Stale - stale-message: > - This issue has been automatically marked as stale because - it has not had recent activity. It will be closed in 14 days if no - further activity occurs. - days-before-stale: 180 - days-before-close: 14 - exempt-labels: 'pinned, Stale Ignore, security, Confirmed Bug, Feature, parcel 2' - dry-run: 'false' diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 5adaa9143..6301163e0 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -1,4 +1,4 @@ -name: tag-release +name: Tag Release on: release: @@ -14,72 +14,13 @@ jobs: release-command: yarn release type: latest - # Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml - repl_build: - name: Build REPL - runs-on: ubuntu-latest + repl: + if: false + name: Deploy REPL + uses: ./.github/workflows/repl.yml permissions: contents: read deployments: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - targets: wasm32-unknown-unknown - - name: Install wasm-opt - run: | - curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz - tar -xf binaryen-version_116-x86_64-linux.tar.gz - echo "$PWD/binaryen-version_116/bin" >> $GITHUB_PATH - - uses: Swatinem/rust-cache@v2 - with: - key: wasm - - name: Bump max inotify watches - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p; - - run: yarn --frozen-lockfile - - name: Build native packages - run: yarn build-native-release - - run: yarn build - - run: yarn build-native-wasm - - run: yarn workspace @parcel/repl build - # - name: Upload REPL - # uses: actions/upload-artifact@v3 - # with: - # name: REPL - # path: 'packages/dev/repl/dist' - - name: Start Deployment - uses: bobheadxi/deployments@v1 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.head_ref }} - env: Production - override: false - - name: Deploy to Vercel - uses: amondnet/vercel-action@v25 - id: vercel-action - with: - vercel-token: ${{ secrets.REPL_VERCEL_TOKEN }} - vercel-org-id: ${{ secrets.REPL_VERCEL_ORG_ID }} - vercel-project-id: ${{ secrets.REPL_VERCEL_PROJECT_ID }} - github-comment: false - working-directory: packages/dev/repl - vercel-args: '--prod' - scope: parcel - - name: Update Deployment Status - uses: bobheadxi/deployments@v1 - if: always() - with: - step: finish - token: ${{ secrets.GITHUB_TOKEN }} - env: Production - override: false - status: ${{ job.status }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - env_url: ${{ steps.vercel-action.outputs.preview-url }} + secrets: inherit + with: + environment: Production