turbo-ignore 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +13 -0
- package/.turbo/turbo-check-types.log +5 -0
- package/.turbo/turbo-lint.log +6 -0
- package/.turbo/turbo-test.log +17 -0
- package/README.md +11 -0
- package/__tests__/ignore.test.ts +29 -0
- package/dist/index.js +3794 -0
- package/dist/package.json +38 -0
- package/jest.config.js +7 -0
- package/package.json +13 -9
- package/src/getComparison.ts +17 -0
- package/src/index.ts +116 -0
- package/tsconfig.json +6 -0
- package/tsup.config.ts +8 -0
- package/yarn-error.log +71 -0
- package/index.js +0 -3949
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[35mturbo-ignore:build[0m: cache hit, replaying output [2m22f77e7f2d7f142a[0m
|
|
2
|
+
[35mturbo-ignore:build: [0m
|
|
3
|
+
[35mturbo-ignore:build: [0m> turbo-ignore@0.0.39 build /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
|
|
4
|
+
[35mturbo-ignore:build: [0m> tsup index.js --format=cjs && cp ./package.json ./dist/package.json "--cool"
|
|
5
|
+
[35mturbo-ignore:build: [0m
|
|
6
|
+
[35mturbo-ignore:build: [0mCLI Building entry: index.js
|
|
7
|
+
[35mturbo-ignore:build: [0mCLI tsup v5.12.6
|
|
8
|
+
[35mturbo-ignore:build: [0mCLI Target: node12
|
|
9
|
+
[35mturbo-ignore:build: [0mCJS Build start
|
|
10
|
+
[35mturbo-ignore:build: [0mCJS ⚡️ Build success in 32ms
|
|
11
|
+
[35mturbo-ignore:build: [0mCJS dist/index.js 136.58 KB
|
|
12
|
+
[35mturbo-ignore:build: [0mcp: --cool is not a directory
|
|
13
|
+
[35mturbo-ignore:build: [0m ELIFECYCLE Command failed with exit code 1.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
[33mturbo-ignore:check-types[0m: cache hit, replaying output [2mcc6ee767690bb4b9[0m
|
|
2
|
+
[33mturbo-ignore:check-types: [0m
|
|
3
|
+
[33mturbo-ignore:check-types: [0m> turbo-ignore@0.1.0 check-types /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
|
|
4
|
+
[33mturbo-ignore:check-types: [0m> tsc --noEmit
|
|
5
|
+
[33mturbo-ignore:check-types: [0m
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[32mturbo-ignore:lint[0m: cache hit, replaying output [2mf9501944cf35e2b0[0m
|
|
2
|
+
[32mturbo-ignore:lint: [0m
|
|
3
|
+
[32mturbo-ignore:lint: [0m> turbo-ignore@0.1.0 lint /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
|
|
4
|
+
[32mturbo-ignore:lint: [0m> eslint src/**/*.ts
|
|
5
|
+
[32mturbo-ignore:lint: [0m
|
|
6
|
+
[32mturbo-ignore:lint: [0mWarning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[34mturbo-ignore:test[0m: cache hit, replaying output [2m9a464a91e0c65822[0m
|
|
2
|
+
[34mturbo-ignore:test: [0m
|
|
3
|
+
[34mturbo-ignore:test: [0m> turbo-ignore@0.1.0 test /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
|
|
4
|
+
[34mturbo-ignore:test: [0m> jest
|
|
5
|
+
[34mturbo-ignore:test: [0m
|
|
6
|
+
[34mturbo-ignore:test: [0mPASS __tests__/ignore.test.ts
|
|
7
|
+
[34mturbo-ignore:test: [0m turbo-ignore
|
|
8
|
+
[34mturbo-ignore:test: [0m getComparison()
|
|
9
|
+
[34mturbo-ignore:test: [0m ✓ uses headRelative comparison when not running Vercel CI (2 ms)
|
|
10
|
+
[34mturbo-ignore:test: [0m ✓ returns null when running in Vercel CI with no VERCEL_GIT_PREVIOUS_SHA (1 ms)
|
|
11
|
+
[34mturbo-ignore:test: [0m ✓ used previousDeploy when running in Vercel CI with VERCEL_GIT_PREVIOUS_SHA
|
|
12
|
+
[34mturbo-ignore:test: [0m
|
|
13
|
+
[34mturbo-ignore:test: [0mTest Suites: 1 passed, 1 total
|
|
14
|
+
[34mturbo-ignore:test: [0mTests: 3 passed, 3 total
|
|
15
|
+
[34mturbo-ignore:test: [0mSnapshots: 2 passed, 2 total
|
|
16
|
+
[34mturbo-ignore:test: [0mTime: 1.022 s
|
|
17
|
+
[34mturbo-ignore:test: [0mRan all test suites.
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# `turbo-ignore`
|
|
2
|
+
|
|
3
|
+
To get started, use the following command as your [Ignored Build Step](https://vercel.com/docs/concepts/projects/overview#ignored-build-step):
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
$ npx turbo-ignore
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
This uses `turbo` to automatically determine if the current app has new changes that need to be deployed.
|
|
10
|
+
|
|
11
|
+
For more information about Turborepo, [visit turborepo.org](https://turborepo.org) and follow us on Twitter ([@turborepo](https://twitter.com/turborepo))!
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getComparison } from "../src/getComparison";
|
|
2
|
+
|
|
3
|
+
describe("turbo-ignore", () => {
|
|
4
|
+
describe("getComparison()", () => {
|
|
5
|
+
it("uses headRelative comparison when not running Vercel CI", async () => {
|
|
6
|
+
expect(getComparison()).toMatchInlineSnapshot(`
|
|
7
|
+
Object {
|
|
8
|
+
"ref": "HEAD^",
|
|
9
|
+
"type": "headRelative",
|
|
10
|
+
}
|
|
11
|
+
`);
|
|
12
|
+
});
|
|
13
|
+
it("returns null when running in Vercel CI with no VERCEL_GIT_PREVIOUS_SHA", async () => {
|
|
14
|
+
process.env.VERCEL = "1";
|
|
15
|
+
expect(getComparison()).toBeNull();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("used previousDeploy when running in Vercel CI with VERCEL_GIT_PREVIOUS_SHA", async () => {
|
|
19
|
+
process.env.VERCEL = "1";
|
|
20
|
+
process.env.VERCEL_GIT_PREVIOUS_SHA = "mygitsha";
|
|
21
|
+
expect(getComparison()).toMatchInlineSnapshot(`
|
|
22
|
+
Object {
|
|
23
|
+
"ref": "mygitsha",
|
|
24
|
+
"type": "previousDeploy",
|
|
25
|
+
}
|
|
26
|
+
`);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
});
|