Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v2' into lmdb-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Binns-Smith committed Mar 16, 2021
2 parents 10a54af + a3aa868 commit c2f6ac5
Show file tree
Hide file tree
Showing 649 changed files with 20,075 additions and 8,112 deletions.
4 changes: 1 addition & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ esproposal.nullish_coalescing=enable
esproposal.optional_chaining=enable
module.system.node.main_field=source
module.system.node.main_field=main
types_first=true
well_formed_exports=true

[strict]
nonstrict-import
Expand All @@ -40,4 +38,4 @@ untyped-import
untyped-type-import

[version]
0.141.0
0.146.0
35 changes: 31 additions & 4 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest, windows-latest]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -23,9 +23,6 @@ jobs:
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
if: ${{ matrix.os == 'ubuntu-latest' }}
run: strip native-packages/*/*.node
- name: Strip debug symbols
if: ${{ matrix.os == 'macos-latest' }}
run: strip -x native-packages/*/*.node # Must use -x on macOS. This produces larger results on linux.
- name: Upload artifacts
Expand All @@ -36,6 +33,36 @@ jobs:
- name: Smoke test
run: node -e "require('@parcel/fs-search')"

build-linux-gnu-x64:
name: linux-gnu-x64
runs-on: ubuntu-latest
container:
image: docker.io/centos/nodejs-12-centos7
steps:
- uses: actions/checkout@v1
- name: Install yarn
run: npm install --global yarn@1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: strip native-packages/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-linux-gnu-x64
path: native-packages/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
- name: Smoke test
run: node -e 'require("@parcel/fs-search")'

build-linux-gnu-arm:
strategy:
fail-fast: false
Expand Down
35 changes: 31 additions & 4 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest, windows-latest]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -22,9 +22,6 @@ jobs:
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
if: ${{ matrix.os == 'ubuntu-latest' }}
run: strip native-packages/*/*.node
- name: Strip debug symbols
if: ${{ matrix.os == 'macos-latest' }}
run: strip -x native-packages/*/*.node # Must use -x on macOS. This produces larger results on linux.
- name: Upload artifacts
Expand All @@ -35,6 +32,36 @@ jobs:
- name: Smoke test
run: node -e "require('@parcel/fs-search')"

build-linux-gnu-x64:
name: linux-gnu-x64
runs-on: ubuntu-latest
container:
image: docker.io/centos/nodejs-12-centos7
steps:
- uses: actions/checkout@v1
- name: Install yarn
run: npm install --global yarn@1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Link native packages
run: node scripts/link-native.js
- uses: bahmutov/[email protected]
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: strip native-packages/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bindings-linux-gnu-x64
path: native-packages/*/*.node
- name: debug
run: ls -l native-packages/*/*.node
- name: Smoke test
run: node -e 'require("@parcel/fs-search")'

build-linux-gnu-arm:
strategy:
fail-fast: false
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Welcome, we really appreciate if you're considering to contribute, the joint effort of our contributors make awesome projects like this possible!
Welcome, we really appreciate if you're considering to contribute, the joint effort of our contributors make projects like this possible!

The goal of this document is to provide guidance on how you can get involved.

Expand All @@ -14,14 +14,14 @@ 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) and [Yarn](https://yarnpkg.com).

The process starts by [forking](https://help.github.com/articles/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.
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.

Clone the forked repository locally and install the dependencies:

```sh
git clone git@github.com:USERNAME/parcel.git
git clone https://github.com/USERNAME/parcel.git
cd parcel
yarn install
```
Expand All @@ -38,15 +38,15 @@ Use `yarn format` to make sure we keep the code format consistent.

Use `yarn lint` to check for stylistic or unwanted errors.

If you want to test out your change outside of the monorepo, you ran run `/path/to/monorepo/packages/core/parcel/src/bin.js build src/index.html` (provided that you don't have any `@parcel/*` plugins installed in this project).

## Notes and things to be aware of

If you're just getting started to understand how the internals work, start from `/packages/core/core/src/Parcel.js`

The `packages/core/parcel-bundler` is the source of v1, kept for reference and will be removed

⚠️ You can set `PARCEL_WORKERS` to the number of worker processes to spawn. `PARCEL_WORKERS=1` is handy for debugging, because all code will run on the main thread. You can then place breakpoints in Asset code. (Normally these breakpoints won't trigger, because the code executes in a subprocess.)
⚠️ You can set `PARCEL_WORKERS` to the number of worker processes to spawn. `PARCEL_WORKERS=0` is handy for debugging, because all code will run on the main thread. You can then place breakpoints in Asset code. (Normally these breakpoints won't trigger, because the code executes in a subprocess.)

⚠️ When developing plugins or new `Asset` types, run with `--no-cache` (or pass `cache: false` to `Bundler` options). Parcel uses caching by default, but during development you'll normally pass incomplete results into the cache. This can leave you wondering why you're constantly seeing old results.
⚠️ When developing plugins, run with `--no-cache` (or pass `shouldDisableCache: true` to `Parcel` options). Parcel uses caching by default, but during development you'll normally pass incomplete results into the cache. This can leave you wondering why you're constantly seeing old results.

You can set `PARCEL_MAX_CONCURRENT_CALLS` to change the limit of concurrent calls per worker.

Expand Down
1 change: 1 addition & 0 deletions flow-libs/babel-core.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ declare module "@babel/core" {

declare export function loadOptions(options?: Options): Options;
declare export function loadPartialConfig(options?: Object): any;
declare export function loadPartialConfigAsync(options?: Object): Promise<any>;
declare export function createConfigItem(
value:
| string
Expand Down
16 changes: 6 additions & 10 deletions flow-libs/babel-traverse.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,7 @@ declare module "@babel/traverse" {
JSX,
Private,
TSTypeElement,
TSType,
NumberLiteral,
RegexLiteral,
RestProperty,
SpreadProperty } from "@babel/types";
TSType } from "@babel/types";

declare export type VariableDeclarationKind =
| "var"
Expand Down Expand Up @@ -428,7 +424,7 @@ declare module "@babel/traverse" {
allowInsertArrow?: boolean,
specCompliant?: boolean
|}): void;
ensureBlock(): BabelBlockStatement;
ensureBlock(): BlockStatement;

addComment(type: string, content: string, line?: boolean): void;
addComments(type: string, comments: Array<string>): void;
Expand Down Expand Up @@ -1039,10 +1035,10 @@ declare module "@babel/traverse" {
Private?: SingleVisitor<Private, S>,
TSTypeElement?: SingleVisitor<TSTypeElement, S>,
TSType?: SingleVisitor<TSType, S>,
NumberLiteral?: SingleVisitor<NumberLiteral, S>,
RegexLiteral?: SingleVisitor<RegexLiteral, S>,
RestProperty?: SingleVisitor<RestProperty, S>,
SpreadProperty?: SingleVisitor<SpreadProperty, S>,
NumberLiteral?: SingleVisitor<Node, S>,
RegexLiteral?: SingleVisitor<Node, S>,
RestProperty?: SingleVisitor<Node, S>,
SpreadProperty?: SingleVisitor<Node, S>,
[string]: SingleVisitor<Node, S>,
...
};
Expand Down
6 changes: 3 additions & 3 deletions flow-libs/babel-types.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ declare module "@babel/types" {
declare export function blockStatement(body: $ReadOnlyArray<BabelNodeStatement>, directives?: ?$ReadOnlyArray<BabelNodeDirective>): BabelNodeBlockStatement;
declare export function breakStatement(label?: ?BabelNodeIdentifier): BabelNodeBreakStatement;
declare export function callExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: $ReadOnlyArray<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeCallExpression;
declare export function catchClause(param?: ?BabelNodeIdentifier | BabelNode$ReadOnlyArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause;
declare export function catchClause(param?: ?BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause;
declare export function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression;
declare export function continueStatement(label?: ?BabelNodeIdentifier): BabelNodeContinueStatement;
declare export function debuggerStatement(): BabelNodeDebuggerStatement;
Expand Down Expand Up @@ -1885,7 +1885,7 @@ declare module "@babel/types" {
declare export function variableDeclarator(id: BabelNodeLVal, init?: ?BabelNodeExpression): BabelNodeVariableDeclarator;
declare export function whileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWhileStatement;
declare export function withStatement(object: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWithStatement;
declare export function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNode$ReadOnlyArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern;
declare export function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern;
declare export function arrayPattern(elements: $ReadOnlyArray<null | BabelNodePatternLike>): BabelNodeArrayPattern;
declare export function arrowFunctionExpression(params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement | BabelNodeExpression, async?: ?boolean): BabelNodeArrowFunctionExpression;
declare export function classBody(body: $ReadOnlyArray<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature>): BabelNodeClassBody;
Expand Down Expand Up @@ -2423,7 +2423,7 @@ declare module "@babel/types" {
declare export function isType(nodetype: ?string, targetType: string): boolean;
declare export function isValidES3Identifier(name: string): boolean;
declare export function isValidES3Identifier(name: string): boolean;
declare export function isValidIdentifier(name: string): boolean;
declare export function isValidIdentifier(name: string, reserved?: boolean): boolean;
declare export function isVar(node: BabelNode): boolean;
declare export function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean;
declare export function validate(n: BabelNode, key: string, value: mixed): void;
Expand Down
130 changes: 130 additions & 0 deletions flow-libs/chalk.js.flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// https://github.com/flow-typed/flow-typed/pull/3990/files

declare module 'chalk' {
declare type Color =
| 'black'
| 'red'
| 'green'
| 'yellow'
| 'blue'
| 'magenta'
| 'cyan'
| 'white'
| 'gray'
| 'grey'
| 'blackBright'
| 'redBright'
| 'greenBright'
| 'yellowBright'
| 'blueBright'
| 'magentaBright'
| 'cyanBright'
| 'whiteBright'
| 'bgBlack'
| 'bgRed'
| 'bgGreen'
| 'bgYellow'
| 'bgBlue'
| 'bgMagenta'
| 'bgCyan'
| 'bgWhite'
| 'bgBlackBright'
| 'bgRedBright'
| 'bgGreenBright'
| 'bgYellowBright'
| 'bgBlueBright'
| 'bgMagentaBright'
| 'bgCyanBright'
| 'bgWhiteBright';

declare type TemplateStringsArray = $ReadOnlyArray<string>;

declare type Level = $Values<{
None: 0,
Basic: 1,
Ansi256: 2,
TrueColor: 3,
...
}>;

declare type ChalkOptions = {|
level?: Level,
|};

declare type ColorSupport = {|
level: Level,
hasBasic: boolean,
has256: boolean,
has16m: boolean,
|};

declare type Chalk = {|
(...text: string[]): string,
(text: TemplateStringsArray, ...placeholders: string[]): string,
Instance(options?: ChalkOptions): Chalk,
level: Level,
rgb(r: number, g: number, b: number): Chalk,
hsl(h: number, s: number, l: number): Chalk,
hsv(h: number, s: number, v: number): Chalk,
hwb(h: number, w: number, b: number): Chalk,
bgHex(color: string): Chalk,
bgKeyword(color: string): Chalk,
bgRgb(r: number, g: number, b: number): Chalk,
bgHsl(h: number, s: number, l: number): Chalk,
bgHsv(h: number, s: number, v: number): Chalk,
bgHwb(h: number, w: number, b: number): Chalk,
hex(color: string): Chalk,
keyword(color: string): Chalk,

+reset: Chalk,
+bold: Chalk,
+dim: Chalk,
+italic: Chalk,
+underline: Chalk,
+inverse: Chalk,
+hidden: Chalk,
+strikethrough: Chalk,

+visible: Chalk,

+[Color]: Chalk,
+red: Chalk,
+green: Chalk,
+yellow: Chalk,
+blue: Chalk,
+magenta: Chalk,
+cyan: Chalk,
+white: Chalk,
+gray: Chalk,
+grey: Chalk,
+blackBright: Chalk,
+redBright: Chalk,
+greenBright: Chalk,
+yellowBright: Chalk,
+blueBright: Chalk,
+magentaBright: Chalk,
+cyanBright: Chalk,
+whiteBright: Chalk,

+bgBlack: Chalk,
+bgRed: Chalk,
+bgGreen: Chalk,
+bgYellow: Chalk,
+bgBlue: Chalk,
+bgMagenta: Chalk,
+bgCyan: Chalk,
+bgWhite: Chalk,
+bgBlackBright: Chalk,
+bgRedBright: Chalk,
+bgGreenBright: Chalk,
+bgYellowBright: Chalk,
+bgBlueBright: Chalk,
+bgMagentaBright: Chalk,
+bgCyanBright: Chalk,
+bgWhiteBrigh: Chalk,

supportsColor: ColorSupport,
|};

declare module.exports: Chalk;
}
Loading

0 comments on commit c2f6ac5

Please sign in to comment.