Skip to content

Commit

Permalink
Merge branch 'v2' of github.com:parcel-bundler/parcel into bdo/number…
Browse files Browse the repository at this point in the history
…-edgetypes

# Conflicts:
#	packages/core/core/src/BundleGraph.js
#	packages/core/core/src/dumpGraphToGraphViz.js
#	yarn.lock
  • Loading branch information
devongovett committed May 30, 2021
2 parents b453252 + ff460d3 commit 65bd2df
Show file tree
Hide file tree
Showing 441 changed files with 16,361 additions and 9,993 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ packages/*/*/test/mochareporters.json
packages/core/integration-tests/test/input/**
packages/core/utils/test/input/**
packages/utils/fs-write-stream-atomic/**
packages/utils/create-react-app/templates
packages/examples

# Generated by the build
Expand Down
6 changes: 2 additions & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<PROJECT_ROOT>/packages/core/integration-tests/dist/**
<PROJECT_ROOT>/packages/core/integration-tests/test/input/**
<PROJECT_ROOT>/packages/core/integration-tests/test/integration/babel-strip-flow-types/**
<PROJECT_ROOT>/packages/core/integration-tests/test/integration/diagnostic-sourcemap/**

[untyped]
.*/node_modules/graphql/error/GraphQLError.js.flow
Expand All @@ -22,9 +23,6 @@ implicit-inexact-object=error
untyped-type-import=error

[options]
esproposal.export_star_as=enable
esproposal.nullish_coalescing=enable
esproposal.optional_chaining=enable
module.system.node.main_field=source
module.system.node.main_field=main

Expand All @@ -38,4 +36,4 @@ untyped-import
untyped-type-import

[version]
0.148.0
0.151.0
57 changes: 29 additions & 28 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
toolchain: stable
profile: minimal
override: true
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
if: ${{ matrix.os == 'macos-latest' }}
run: strip -x native-packages/*/*.node # Must use -x on macOS. This produces larger results on linux.
run: strip -x packages/*/*/*.node # Must use -x on macOS. This produces larger results on linux.
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-${{ matrix.os }}
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: Smoke test
run: node -e "require('@parcel/fs-search')"

Expand All @@ -48,18 +48,18 @@ jobs:
toolchain: stable
profile: minimal
override: true
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: strip native-packages/*/*.node
run: strip packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-linux-gnu-x64
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node
- name: Smoke test
run: node -e 'require("@parcel/fs-search")'

Expand Down Expand Up @@ -89,20 +89,20 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
env:
RUST_TARGET: ${{ matrix.target }}
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: ${{ matrix.strip }} native-packages/*/*.node
run: ${{ matrix.strip }} packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-${{ matrix.target }}
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node
- name: Configure binfmt-support
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Smoke test
Expand Down Expand Up @@ -143,20 +143,20 @@ jobs:
curl -O https://musl.cc/aarch64-linux-musl-cross.tgz
tar xzf aarch64-linux-musl-cross.tgz
cp -R aarch64-linux-musl-cross/* /usr
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
env:
RUST_TARGET: ${{ matrix.target }}
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: ${{ matrix.strip }} native-packages/*/*.node
run: ${{ matrix.strip }} packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-linux-musl
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node
- name: Smoke test
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
run: node -e 'require("@parcel/fs-search")'
Expand All @@ -173,20 +173,21 @@ jobs:
profile: minimal
override: true
target: aarch64-apple-darwin
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
env:
RUST_TARGET: aarch64-apple-darwin
JEMALLOC_SYS_WITH_LG_PAGE: 14
- name: Strip debug symbols
run: strip -x native-packages/*/*.node
run: strip -x packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-apple-aarch64
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node

build-and-release:
runs-on: ubuntu-latest
Expand All @@ -198,17 +199,17 @@ jobs:
- build-apple-silicon
steps:
- uses: actions/checkout@v1
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Move artifacts
run: for d in artifacts/*/*; do cp $d/*.node native-packages/$(basename $d); done
run: for d in artifacts/*/*/*; do cp $d/*.node packages/$(basename $(dirname $d))/$(basename $d); done
- name: Debug
run: ls -l native-packages/*/*
run: ls -l packages/*/*/*.node
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
57 changes: 29 additions & 28 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
toolchain: stable
profile: minimal
override: true
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
if: ${{ matrix.os == 'macos-latest' }}
run: strip -x native-packages/*/*.node # Must use -x on macOS. This produces larger results on linux.
run: strip -x packages/*/*/*.node # Must use -x on macOS. This produces larger results on linux.
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-${{ matrix.os }}
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: Smoke test
run: node -e "require('@parcel/fs-search')"

Expand All @@ -47,18 +47,18 @@ jobs:
toolchain: stable
profile: minimal
override: true
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: strip native-packages/*/*.node
run: strip packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-linux-gnu-x64
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node
- name: Smoke test
run: node -e 'require("@parcel/fs-search")'

Expand Down Expand Up @@ -88,20 +88,20 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
env:
RUST_TARGET: ${{ matrix.target }}
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: ${{ matrix.strip }} native-packages/*/*.node
run: ${{ matrix.strip }} packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-${{ matrix.target }}
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node
- name: Configure binfmt-support
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Smoke test
Expand Down Expand Up @@ -142,20 +142,20 @@ jobs:
curl -O https://musl.cc/aarch64-linux-musl-cross.tgz
tar xzf aarch64-linux-musl-cross.tgz
cp -R aarch64-linux-musl-cross/* /usr
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
env:
RUST_TARGET: ${{ matrix.target }}
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: ${{ matrix.strip }} native-packages/*/*.node
run: ${{ matrix.strip }} packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-linux-musl
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node
- name: Smoke test
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
run: node -e 'require("@parcel/fs-search")'
Expand All @@ -172,20 +172,21 @@ jobs:
profile: minimal
override: true
target: aarch64-apple-darwin
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
env:
RUST_TARGET: aarch64-apple-darwin
JEMALLOC_SYS_WITH_LG_PAGE: 14
- name: Strip debug symbols
run: strip -x native-packages/*/*.node
run: strip -x packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-apple-aarch64
path: native-packages/*/*.node
path: packages/*/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
run: ls -l packages/*/*/*.node

build-and-release:
runs-on: ubuntu-latest
Expand All @@ -197,17 +198,17 @@ jobs:
- build-apple-silicon
steps:
- uses: actions/checkout@v1
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Move artifacts
run: for d in artifacts/*/*; do cp $d/*.node native-packages/$(basename $d); done
run: for d in artifacts/*/*/*; do cp $d/*.node packages/$(basename $(dirname $d))/$(basename $d); done
- name: Debug
run: ls -l native-packages/*/*
run: ls -l packages/*/*/*.node
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
/target/
.DS_Store
package-lock.json
coverage/
Expand All @@ -20,4 +21,3 @@ tmp
parcel-bundle-reports/
.verdaccio_storage/
sourcemap-info.json
packages/native-packages
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# Generated with husky-init and https://github.com/typicode/husky-4-to-6
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{
"files": [
"packages/packagers/js/src/prelude.js",
"packages/packagers/swc/src/dev-prelude.js",
"packages/shared/scope-hoisting/src/helpers.js"
],
"options": {
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Please be polite and take the time to write a well-worded question so our commun

In order to make it easier to get familiar with the codebase we labeled simpler issues using [Good First Issue](https://github.com/parcel-bundler/parcel/issues?q=is%3Aopen+is%3Aissue+label%3A%22%E2%9C%A8+Parcel+2%22+label%3A%22%3Ababy%3A+Good+First+Issue%22) and [Help Wanted](https://github.com/parcel-bundler/parcel/issues?q=is%3Aopen+is%3Aissue+label%3A%22%E2%9C%A8+Parcel+2%22+label%3A%22%3Apray%3A+Help+Wanted%22).

Before starting make sure you have the following requirements installed: [git](https://git-scm.com), [Node](https://nodejs.org) and [Yarn](https://yarnpkg.com).
Before starting make sure you have the following requirements installed: [git](https://git-scm.com), [Node](https://nodejs.org), [Yarn](https://yarnpkg.com) and [Rust](https://www.rust-lang.org/tools/install).

The process starts by [forking](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the project and setup a new branch to work in. It's important that the changes are made in separated branches in order to ensure a pull request only includes the commits related to a bug or feature.

Expand All @@ -24,6 +24,7 @@ Clone the forked repository locally and install the dependencies:
git clone https://github.com/USERNAME/parcel.git
cd parcel
yarn install
yarn build-native
```

In the folder `packages/example`, create a temporary example to debug. You can start by copying the `simple` example and try to reproduce the bug.
Expand Down
Loading

0 comments on commit 65bd2df

Please sign in to comment.