Skip to content

Commit

Permalink
Merge branch 'canary' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhooks authored Aug 12, 2024
2 parents 3083b34 + 73c8d41 commit 649d946
Show file tree
Hide file tree
Showing 5,424 changed files with 835,355 additions and 554,741 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 13 additions & 3 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 All @@ -21,11 +22,20 @@ rustflags = ["-C", "target-feature=+crt-static"]
[target.aarch64-pc-windows-msvc]
linker = "rust-lld"

[target.aarch64-apple-darwin]
[target.'cfg(target_os = "macos")']
linker = "rust-lld"

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[target.'cfg(all(target_os = "linux", target_env = "gnu"))']
rustflags = [
"--cfg",
"tokio_unstable",
"-Zshare-generics=y",
"-Zthreads=8",
"-Zunstable-options",
"-Csymbol-mangling-version=v0",
"-Clinker-flavor=gnu-lld-cc",
"-Clink-self-contained=+linker",
]

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
Expand Down
42 changes: 42 additions & 0 deletions .config/ast-grep/rule-tests/__snapshots__/no-context-snapshot.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 };'
File renamed without changes.
22 changes: 22 additions & 0 deletions .config/ast-grep/rules/no-context.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# yaml-language-server: $schema=https://github.com/raw/ast-grep/ast-grep/main/schemas/rule.json

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
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
ARG VARIANT=20-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
ARG VARIANT=20-bullseye
FROM node:${VARIANT}

# [Option] Install zsh
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": {
"VARIANT": "16-bullseye"
"VARIANT": "20-bullseye"
}
},
// Configure tool-specific properties.
Expand Down
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ test/production/emit-decorator-metadata/**/*.js
!test/**/*.test.*
test/e2e/app-dir/rsc-errors/app/swc/use-client/page.js
test-timings.json
packages/next-swc/crates/**
crates/**
bench/nested-deps/**
bench/nested-deps-app-router/**
bench/heavy-npm-deps/**
packages/next-bundle-analyzer/index.d.ts
examples/with-typescript-graphql/lib/gql/
test/development/basic/hmr/components/parse-error.js
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
25 changes: 25 additions & 0 deletions .eslintrc.cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://json.schemastore.org/eslintrc",
"extends": [".eslintrc.json"],
"overrides": [
{
// This override adds type-checked rules.
"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",
"turbopack/**/*"
],
"parserOptions": {
"project": true
},
"rules": {
// TODO: enable in follow-up PR
"@typescript-eslint/no-floating-promises": "off"
}
}
]
}
Loading

0 comments on commit 649d946

Please sign in to comment.