Skip to content

Commit 7332245

Browse files
authored
Merge branch 'vercel:canary' into with-mongodb-update
2 parents bcb664e + 86230b2 commit 7332245

File tree

2,809 files changed

+751970
-505417
lines changed

Some content is hidden

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

2,809 files changed

+751970
-505417
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[env]
22
CARGO_WORKSPACE_DIR = { value = "", relative = true }
3+
TURBO_PNPM_WORKSPACE_DIR = { value = "", relative = true }
34

45
[build]
56
rustflags = [
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
id: no-context
2+
snapshots:
3+
'fn foo(context: ChunkingContext) -> u32 { 5 };':
4+
labels:
5+
- source: context
6+
style: primary
7+
start: 7
8+
end: 14
9+
- source: 'context: ChunkingContext'
10+
style: secondary
11+
start: 7
12+
end: 31
13+
foo(|context| context):
14+
labels:
15+
- source: context
16+
style: primary
17+
start: 5
18+
end: 12
19+
- source: '|context|'
20+
style: secondary
21+
start: 4
22+
end: 13
23+
let context = ChunkingContext::new();:
24+
labels:
25+
- source: context
26+
style: primary
27+
start: 4
28+
end: 11
29+
- source: let context = ChunkingContext::new();
30+
style: secondary
31+
start: 0
32+
end: 37
33+
'struct Foo { context: Context };':
34+
labels:
35+
- source: context
36+
style: primary
37+
start: 13
38+
end: 20
39+
- source: 'context: Context'
40+
style: secondary
41+
start: 13
42+
end: 29
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
id: no-context
2+
valid:
3+
- 'let chunking_context = ChunkingContext::new();'
4+
- 'struct Foo { chunking_context: Context };'
5+
- 'foo(|chunking_context| context)'
6+
- 'fn foo(chunking_context: ChunkingContext) -> u32 { 5 };'
7+
invalid:
8+
- 'let context = ChunkingContext::new();'
9+
- 'struct Foo { context: Context };'
10+
- 'foo(|context| context)'
11+
- 'fn foo(context: ChunkingContext) -> u32 { 5 };'

.config/ast-grep/rule-utils/.gitkeep

Whitespace-only changes.

.config/ast-grep/rules/no-context.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
id: no-context
2+
message: Don't name variables `context`.
3+
note: Use a more specific name, such as chunking_context, asset_context, etc.
4+
severity: error
5+
language: Rust
6+
rule:
7+
regex: \bcontext\b
8+
any:
9+
- all:
10+
- inside:
11+
any:
12+
- kind: closure_parameters
13+
- kind: parameter
14+
- kind: function_item
15+
- kind: let_declaration
16+
- kind: identifier
17+
- all:
18+
- kind: field_identifier
19+
- inside:
20+
kind: field_declaration
21+
ignores:
22+
- './crates/turbopack-css/**'
23+
- './crates/turbopack-dev-server/**'
24+
- './crates/turbopack-browser/**'
25+
- './crates/turbopack-ecmascript-hmr-protocol/**'
26+
- './crates/turbopack-ecmascript-plugins/**'
27+
- './crates/turbopack-ecmascript-runtime/**'
28+
- './crates/turbopack-json/**'
29+
- './crates/turbopack-mdx/**'
30+
- './crates/turbopack-node/**'
31+
- './crates/turbopack-static/**'
32+
- './crates/turbopack-tests/**'
33+
- './crates/turbopack/**'
34+
- './crates/turborepo-cache/**'
35+
- './crates/turborepo-scm/**'

.config/nextest.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[profile.tp-test-linux.junit]
2+
path = "junit.xml"
3+
report-name = "Turbopack tests (Linux)"
4+
store-success-output = true
5+
store-failure-output = true
6+
7+
[profile.tp-test-mac.junit]
8+
path = "junit.xml"
9+
report-name = "Turbopack tests (Mac)"
10+
store-success-output = true
11+
store-failure-output = true
12+
13+
[profile.tp-test-win.junit]
14+
path = "junit.xml"
15+
report-name = "Turbopack tests (Windows)"
16+
store-success-output = true
17+
store-failure-output = true

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ packages/next-swc/docs/assets/**/*
4545
test/lib/amp-validator-wasm.js
4646
test/production/pages-dir/production/fixture/amp-validator-wasm.js
4747
test/e2e/async-modules/amp-validator-wasm.js
48+
49+
# turbopack crates
50+
turbopack/crates/*/tests/**
51+
turbopack/crates/*/js/src/compiled

.eslintrc.cli.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
"files": ["**/*.ts", "**/*.tsx"],
88
// Linting with type-checked rules is very slow and needs a lot of memory,
99
// so we exclude non-essential files.
10-
"excludedFiles": ["examples/**/*", "test/**/*", "**/*.d.ts"],
10+
"excludedFiles": [
11+
"examples/**/*",
12+
"test/**/*",
13+
"**/*.d.ts",
14+
"turbopack/**/*"
15+
],
1116
"parserOptions": {
1217
"project": true
1318
},

.eslintrc.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"commonjs": true,
1313
"es6": true,
1414
"node": true,
15-
"jest": true
15+
"jest": true,
16+
"es2020": true
1617
},
1718
"parserOptions": {
1819
"requireConfigFile": false,
@@ -101,7 +102,11 @@
101102
"error",
102103
{
103104
"args": "none",
104-
"ignoreRestSiblings": true
105+
"ignoreRestSiblings": true,
106+
"argsIgnorePattern": "^_",
107+
"caughtErrorsIgnorePattern": "^_",
108+
"destructuredArrayIgnorePattern": "^_",
109+
"varsIgnorePattern": "^_"
105110
}
106111
],
107112
"no-use-before-define": "off",

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ packages/next/compiled/** -text linguist-vendored
33

44
# Make next/src/build folder indexable for github search
55
build/** linguist-generated=false
6+
7+
turbopack/crates/turbo-tasks-macros-tests/tests/**/*.stderr linguist-generated=true
8+
turbopack/crates/turbopack-ecmascript/tests/tree-shaker/analyzer/**/output.md linguist-generated=true
9+
turbopack/crates/turbopack-tests/tests/snapshot/**/output/** linguist-generated=true

0 commit comments

Comments
 (0)