Skip to content

Commit

Permalink
Merge branch 'canary' into refactor/replace-indexOf-with-startsWith
Browse files Browse the repository at this point in the history
  • Loading branch information
samcx committed Aug 1, 2024
2 parents 0bce62b + c470e1c commit 5c68bd8
Show file tree
Hide file tree
Showing 2,816 changed files with 752,209 additions and 505,480 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[env]
CARGO_WORKSPACE_DIR = { value = "", relative = true }
TURBO_PNPM_WORKSPACE_DIR = { value = "", relative = true }

[build]
rustflags = [
Expand Down
42 changes: 42 additions & 0 deletions .config/ast-grep/rule-tests/__snapshots__/no-context-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
id: no-context
snapshots:
'fn foo(context: ChunkingContext) -> u32 { 5 };':
labels:
- source: context
style: primary
start: 7
end: 14
- source: 'context: ChunkingContext'
style: secondary
start: 7
end: 31
foo(|context| context):
labels:
- source: context
style: primary
start: 5
end: 12
- source: '|context|'
style: secondary
start: 4
end: 13
let context = ChunkingContext::new();:
labels:
- source: context
style: primary
start: 4
end: 11
- source: let context = ChunkingContext::new();
style: secondary
start: 0
end: 37
'struct Foo { context: Context };':
labels:
- source: context
style: primary
start: 13
end: 20
- source: 'context: Context'
style: secondary
start: 13
end: 29
11 changes: 11 additions & 0 deletions .config/ast-grep/rule-tests/no-context-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
id: no-context
valid:
- 'let chunking_context = ChunkingContext::new();'
- 'struct Foo { chunking_context: Context };'
- 'foo(|chunking_context| context)'
- 'fn foo(chunking_context: ChunkingContext) -> u32 { 5 };'
invalid:
- 'let context = ChunkingContext::new();'
- 'struct Foo { context: Context };'
- 'foo(|context| context)'
- 'fn foo(context: ChunkingContext) -> u32 { 5 };'
Empty file.
35 changes: 35 additions & 0 deletions .config/ast-grep/rules/no-context.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
id: no-context
message: Don't name variables `context`.
note: Use a more specific name, such as chunking_context, asset_context, etc.
severity: error
language: Rust
rule:
regex: \bcontext\b
any:
- all:
- inside:
any:
- kind: closure_parameters
- kind: parameter
- kind: function_item
- kind: let_declaration
- kind: identifier
- all:
- kind: field_identifier
- inside:
kind: field_declaration
ignores:
- './crates/turbopack-css/**'
- './crates/turbopack-dev-server/**'
- './crates/turbopack-browser/**'
- './crates/turbopack-ecmascript-hmr-protocol/**'
- './crates/turbopack-ecmascript-plugins/**'
- './crates/turbopack-ecmascript-runtime/**'
- './crates/turbopack-json/**'
- './crates/turbopack-mdx/**'
- './crates/turbopack-node/**'
- './crates/turbopack-static/**'
- './crates/turbopack-tests/**'
- './crates/turbopack/**'
- './crates/turborepo-cache/**'
- './crates/turborepo-scm/**'
17 changes: 17 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[profile.tp-test-linux.junit]
path = "junit.xml"
report-name = "Turbopack tests (Linux)"
store-success-output = true
store-failure-output = true

[profile.tp-test-mac.junit]
path = "junit.xml"
report-name = "Turbopack tests (Mac)"
store-success-output = true
store-failure-output = true

[profile.tp-test-win.junit]
path = "junit.xml"
report-name = "Turbopack tests (Windows)"
store-success-output = true
store-failure-output = true
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ packages/next-swc/docs/assets/**/*
test/lib/amp-validator-wasm.js
test/production/pages-dir/production/fixture/amp-validator-wasm.js
test/e2e/async-modules/amp-validator-wasm.js

# turbopack crates
turbopack/crates/*/tests/**
turbopack/crates/*/js/src/compiled
7 changes: 6 additions & 1 deletion .eslintrc.cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"files": ["**/*.ts", "**/*.tsx"],
// Linting with type-checked rules is very slow and needs a lot of memory,
// so we exclude non-essential files.
"excludedFiles": ["examples/**/*", "test/**/*", "**/*.d.ts"],
"excludedFiles": [
"examples/**/*",
"test/**/*",
"**/*.d.ts",
"turbopack/**/*"
],
"parserOptions": {
"project": true
},
Expand Down
9 changes: 7 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"commonjs": true,
"es6": true,
"node": true,
"jest": true
"jest": true,
"es2020": true
},
"parserOptions": {
"requireConfigFile": false,
Expand Down Expand Up @@ -101,7 +102,11 @@
"error",
{
"args": "none",
"ignoreRestSiblings": true
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"no-use-before-define": "off",
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ packages/next/compiled/** -text linguist-vendored

# Make next/src/build folder indexable for github search
build/** linguist-generated=false

turbopack/crates/turbo-tasks-macros-tests/tests/**/*.stderr linguist-generated=true
turbopack/crates/turbopack-ecmascript/tests/tree-shaker/analyzer/**/output.md linguist-generated=true
turbopack/crates/turbopack-tests/tests/snapshot/**/output/** linguist-generated=true
2 changes: 1 addition & 1 deletion .github/.react-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-rc-6230622a1a-20240610
19.0.0-rc-3208e73e-20240730
2 changes: 1 addition & 1 deletion .github/actions/next-integration-stat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"engines": {
"node": ">=18.18.0"
},
"packageManager": "pnpm@9.5.0"
"packageManager": "pnpm@9.6.0"
}

Large diffs are not rendered by default.

Loading

0 comments on commit 5c68bd8

Please sign in to comment.