Skip to content

Commit d4a04b8

Browse files
committed
Merge branch 'master' into bugfix/namespace-object
# Conflicts: # test/__snapshots__/StatsTestCases.test.js.snap
2 parents a926a19 + eda273d commit d4a04b8

File tree

131 files changed

+3744
-2228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+3744
-2228
lines changed

.eslintrc.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,20 @@ module.exports = {
2929
"no-loop-func": "warn",
3030
"indent": "off",
3131
"no-console": "off",
32-
"valid-jsdoc": "error",
32+
"valid-jsdoc": ["error", {
33+
"prefer": {
34+
"return": "returns",
35+
"memberof": "DONTUSE",
36+
"class": "DONTUSE",
37+
"inheritdoc": "DONTUSE",
38+
"description": "DONTUSE",
39+
"readonly": "DONTUSE"
40+
},
41+
"preferType": {
42+
"*": "any"
43+
},
44+
"requireReturnType": true
45+
}],
3346
"node/no-unsupported-features": "error",
3447
"node/no-deprecated-api": "error",
3548
"node/no-missing-import": "error",

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
<!-- Please don't delete this template or we'll close your issue -->
8+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
9+
10+
# Bug report
11+
12+
<!-- Please ask questions on StackOverflow or the webpack Gitter. -->
13+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14+
<!-- https://gitter.im/webpack/webpack -->
15+
<!-- Issues which contain questions or support requests will be closed. -->
16+
17+
**What is the current behavior?**
18+
19+
20+
**If the current behavior is a bug, please provide the steps to reproduce.**
21+
22+
23+
<!-- A great way to do this is to provide your configuration via a GitHub repo. -->
24+
<!-- Best provide a minimal reproduceable repo with instructions -->
25+
<!-- Repos with too many files or long configs are not suitable -->
26+
<!-- Please only add small snippets of code directly into the issue -->
27+
<!-- https://gist.github.com is a good place for longer code snippets -->
28+
<!-- If your issue is caused by a plugin or loader file the issue on the plugin/loader repo instead. -->
29+
30+
**What is the expected behavior?**
31+
32+
33+
<!-- "It should work" is not a good explaination -->
34+
<!-- Explain how exactly you expecting it to behave -->
35+
36+
**Other relevant information:**
37+
webpack version:
38+
Node.js version:
39+
Operating System:
40+
Additional tools:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
<!-- Please don't delete this template or we'll close your issue -->
8+
9+
## Feature request
10+
11+
<!-- Issues which contain questions or support requests will be closed. -->
12+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
13+
<!-- Check if this feature need to be implemented in a plugin or loader instead -->
14+
<!-- If yes: file the issue on the plugin/loader repo -->
15+
<!-- Features related to the development server should be filed on this repo instead -->
16+
17+
**What is the expected behavior?**
18+
19+
20+
**What is motivation or use case for adding/changing the behavior?**
21+
22+
23+
**How should this be implemented in your opinion?**
24+
25+
26+
**Are you willing to work on this yourself?**
27+
yes

.github/ISSUE_TEMPLATE/Other.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Other
3+
about: Something else
4+
5+
---
6+
7+
<!-- Bug reports and Feature requests must use other templates, or will be closed -->
8+
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->
9+
<!-- Issues which contain questions or support requests will be closed. -->

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ matrix:
2626
env: NO_WATCH_TESTS=1 JOB_PART=unit
2727
- os: linux
2828
node_js: "6"
29-
env: NO_WATCH_TESTS=1 JEST=--runInBand JOB_PART=integration
29+
env: NO_WATCH_TESTS=1 JEST=--maxWorkers=2 JOB_PART=integration
3030
- os: osx
3131
node_js: "10"
3232
env: NO_WATCH_TESTS=1 JEST=--maxWorkers=2 JOB_PART=integration

_SETUP.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ That's all.
1010

1111
## Setup manually
1212

13-
Setup your local webpack repository
13+
### Setup your local webpack repository
1414

1515
```bash
1616
git clone https://github.com/webpack/webpack.git
@@ -21,8 +21,62 @@ yarn link
2121
yarn link webpack
2222
```
2323

24-
To run the entire test suite use:
24+
### To run the entire test suite use
2525

2626
```bash
2727
yarn test
2828
```
29+
30+
### To run only intergration tests use
31+
32+
```bash
33+
yarn test:integration
34+
```
35+
36+
or in watch mode
37+
38+
```bash
39+
yarn test:integration --watch
40+
```
41+
42+
### To run only unit tests use
43+
44+
```bash
45+
yarn test:unit
46+
```
47+
48+
or in watch mode
49+
50+
```bash
51+
yarn test:unit --watch
52+
```
53+
54+
### To run code formatter (prettier) run
55+
56+
```bash
57+
yarn pretty
58+
```
59+
60+
### To run all linters use
61+
62+
This performs linting on:
63+
64+
* eslint (code-lint script)
65+
* schema (schema-lint script)
66+
* types (type-lint script)
67+
68+
```bash
69+
yarn lint
70+
```
71+
72+
### To run only the typechecker use
73+
74+
```bash
75+
yarn type-lint
76+
```
77+
78+
or incremental (in watch mode)
79+
80+
```bash
81+
yarn type-lint --watch
82+
```

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ environment:
1919
jest: --maxWorkers=2
2020
- nodejs_version: 6
2121
job_part: integration
22-
jest: --runInBand
22+
jest: --maxWorkers=2
2323

2424
install:
2525
- ps: Install-Product node $env:nodejs_version x64

declarations.d.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,69 @@ declare module "chrome-trace-event" {
2929
}
3030
}
3131

32+
// There are no typings for @webassemblyjs/ast
33+
declare module "@webassemblyjs/ast" {
34+
export function traverse(
35+
ast: any,
36+
visitor: { [name: string]: (context: { node: Node }) => void }
37+
);
38+
export class Node {
39+
index: number;
40+
}
41+
export class Identifier extends Node {
42+
value: string;
43+
}
44+
export class ModuleImport extends Node {
45+
module: string;
46+
descr: {
47+
type: string;
48+
valtype: string;
49+
};
50+
name: string;
51+
}
52+
export class ModuleExport extends Node {
53+
name: string;
54+
}
55+
export class IndexLiteral extends Node {}
56+
export class NumberLiteral extends Node {}
57+
export class Global extends Node {}
58+
export class FuncParam extends Node {}
59+
export class Instruction extends Node {}
60+
export class CallInstruction extends Instruction {}
61+
export class ObjectInstruction extends Instruction {}
62+
export class Func extends Node {
63+
signature: Signature;
64+
}
65+
export class Signature {
66+
params: any;
67+
result: any;
68+
}
69+
export class TypeInstructionFunc extends Node {}
70+
export class IndexInFuncSection extends Node {}
71+
export function indexLiteral(index: number): IndexLiteral;
72+
export function numberLiteral(num: number): NumberLiteral;
73+
export function global(globalType: string, nodes: Node[]): Global;
74+
export function identifier(indentifier: string): Identifier;
75+
export function funcParam(valType: string, id: Identifier): FuncParam;
76+
export function instruction(inst: string, args: Node[]): Instruction;
77+
export function callInstruction(funcIndex: IndexLiteral): CallInstruction;
78+
export function objectInstruction(
79+
kind: string,
80+
type: string,
81+
init: Node[]
82+
): ObjectInstruction;
83+
export function func(initFuncId, funcParams, funcResults, funcBody): Func;
84+
export function typeInstructionFunc(params, result): TypeInstructionFunc;
85+
export function indexInFuncSection(index: IndexLiteral): IndexInFuncSection;
86+
export function moduleExport(
87+
identifier: string,
88+
type: string,
89+
index: IndexLiteral
90+
): ModuleExport;
91+
92+
export function getSectionMetadata(ast: any, section: string);
93+
}
94+
3295
/**
3396
* Global variable declarations
3497
* @todo Once this issue is resolved, remove these globals and add JSDoc onsite instead
@@ -51,3 +114,5 @@ declare const WebAssembly;
51114
declare const importScripts;
52115
declare const $crossOriginLoading$;
53116
declare const chunkId;
117+
118+
type TODO = any;

0 commit comments

Comments
 (0)