Skip to content

Commit

Permalink
Run format and eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Oct 11, 2022
1 parent 261aea9 commit 77fe1a6
Show file tree
Hide file tree
Showing 35 changed files with 2,690 additions and 1,356 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"NODE_VERSION": "lts/*"
}
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],

// Set *default* container specific settings.json values on container create.
"settings": {
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-go-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ jobs:
- name: Integration Tests
if: matrix.os != 'windows-latest'
run: pnpm -- turbo run integration-tests --filter=cli

5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ crates/turbopack/bench.json
crates/turbopack/tests/snapshot/**/output/
packages/node-module-trace/npm
packages/turbo-tracing-next-plugin/test/with-mongodb-mongoose
docs/public/schema.json
crates/next-core/src/**
crates/next-dev/tests/**
crates/turbopack-dev-server/src/**
crates/turbopack-ecmascript/src/**
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"gopls": {
"experimentalWorkspaceModule": true
},
"go.lintTool": "golangci-lint",
"go.lintTool": "golangci-lint"
}
20 changes: 10 additions & 10 deletions NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ THIRD-PARTY SOFTWARE NOTICES

This project incorporates components from the projects listed below. The original copyright notices and the licenses under which those components are redistributed are set forth below.

***
---

- https://cs.opensource.google/go/go/+/refs/tags/go1.18.2:src/encoding/csv/reader.go
- https://cs.opensource.google/go/go/+/refs/tags/go1.18.2:src/encoding/csv/reader_test.go
Expand All @@ -13,15 +13,15 @@ Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Expand Down
22 changes: 11 additions & 11 deletions architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ optimized (either for dev or prod) version of it).

We are currently missing:

- `turbopack-node` (node native modules)
- `turbopack-wasm` (WASM in node and on the web)
- `turbopack-image` (images on the web)
- probably more? (e.g. `turbopack-svg`).
- `turbopack-node` (node native modules)
- `turbopack-wasm` (WASM in node and on the web)
- `turbopack-image` (images on the web)
- probably more? (e.g. `turbopack-svg`).

## `turbo-tasks`

Expand All @@ -26,9 +26,9 @@ We are currently missing:
`#[turbo_tasks::value]` is a macro to generate a `XxxVc`
wrapper type for some data (e.g. a struct `Xxx`).

- `XxxVc` is like a Promise to some data stored somewhere
- You can read the data via `.await?`
(e.g. `let x: XxxVc; let data: Xxx = x.await?`);
- `XxxVc` is like a Promise to some data stored somewhere
- You can read the data via `.await?`
(e.g. `let x: XxxVc; let data: Xxx = x.await?`);

`turbo-tasks` values can also implement traits,
see `#[turbo_tasks::value_trait]` for examples.
Expand All @@ -39,10 +39,10 @@ see `#[turbo_tasks::value_trait]` for examples.

This means:

- the function is cached (calling it twice returns the same `XxxVc`).
- dependencies are tracked (reading a `XxxVc` via `.await?` is tracked).
- `turbo-tasks` will take care of re-executing the function when any dependency
has changed.
- the function is cached (calling it twice returns the same `XxxVc`).
- dependencies are tracked (reading a `XxxVc` via `.await?` is tracked).
- `turbo-tasks` will take care of re-executing the function when any dependency
has changed.

From the outside `#[turbo_tasks::function]`s will always return an `XxxVc` (not
a `Result<XxxVc>` or `Future<Output = XxxVc>`).
Expand Down
6 changes: 1 addition & 5 deletions cli/internal/fs/testdata/both/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
// mocked test comment
"^build"
],
"outputs": [
"dist/**",
".next/**",
"!dist/assets/**"
],
"outputs": ["dist/**", ".next/**", "!dist/assets/**"],
"outputMode": "new-only"
} // mocked test comment
},
Expand Down
24 changes: 6 additions & 18 deletions cli/internal/fs/testdata/correct/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@
// mocked test comment
"^build"
],
"outputs": [
"dist/**",
"!dist/assets/**",
".next/**"
],
"outputs": ["dist/**", "!dist/assets/**", ".next/**"],
"outputMode": "new-only"
}, // mocked test comment
"lint": {
"outputs": [],
"dependsOn": [
"$MY_VAR"
],
"dependsOn": ["$MY_VAR"],
"cache": true,
"outputMode": "new-only"
},
Expand All @@ -28,29 +22,23 @@
},
/* mocked test comment */
"publish": {
"outputs": [
"dist/**"
],
"outputs": ["dist/**"],
"inputs": [
/*
/*
mocked test comment
*/
"build/**/*"
],
"dependsOn": [
/* mocked test comment */"^publish",
/* mocked test comment */ "^publish",
"^build",
"build",
"admin#lint"
],
"cache": false
}
},
"globalDependencies": [
"some-file",
"../another-dir/**",
"$GLOBAL_ENV_VAR"
],
"globalDependencies": ["some-file", "../another-dir/**", "$GLOBAL_ENV_VAR"],
"globlaEnv": ["SOME_VAR", "ANOTHER_VAR"],
"remoteCache": {
"teamId": "team_id",
Expand Down
2 changes: 1 addition & 1 deletion cli/internal/fs/testdata/legacy-env/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"task6": { "env": ["A", "B", "C"], "dependsOn": ["$D", "$E", "$F"] },
"task7": { "env": ["A", "B", "C"], "dependsOn": ["$A", "$B", "$C"] },
"task8": { "env": ["A", "B", "C"], "dependsOn": ["A", "B", "C"] },
"task9": { "env": [], "dependsOn": ["$A"] },
"task9": { "env": [], "dependsOn": ["$A"] },
"task10": { "env": ["A", "A"], "dependsOn": ["$A", "$A"] },
"task11": { "env": ["A", "A"], "dependsOn": ["$B", "$B"] }
}
Expand Down
Loading

0 comments on commit 77fe1a6

Please sign in to comment.