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.
@@ -0,0 +1,13 @@
1
+ turbo-ignore:build: cache hit, replaying output 22f77e7f2d7f142a
2
+ turbo-ignore:build: 
3
+ turbo-ignore:build: > turbo-ignore@0.0.39 build /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
4
+ turbo-ignore:build: > tsup index.js --format=cjs && cp ./package.json ./dist/package.json "--cool"
5
+ turbo-ignore:build: 
6
+ turbo-ignore:build: CLI Building entry: index.js
7
+ turbo-ignore:build: CLI tsup v5.12.6
8
+ turbo-ignore:build: CLI Target: node12
9
+ turbo-ignore:build: CJS Build start
10
+ turbo-ignore:build: CJS ⚡️ Build success in 32ms
11
+ turbo-ignore:build: CJS dist/index.js 136.58 KB
12
+ turbo-ignore:build: cp: --cool is not a directory
13
+ turbo-ignore:build:  ELIFECYCLE  Command failed with exit code 1.
@@ -0,0 +1,5 @@
1
+ turbo-ignore:check-types: cache hit, replaying output cc6ee767690bb4b9
2
+ turbo-ignore:check-types: 
3
+ turbo-ignore:check-types: > turbo-ignore@0.1.0 check-types /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
4
+ turbo-ignore:check-types: > tsc --noEmit
5
+ turbo-ignore:check-types: 
@@ -0,0 +1,6 @@
1
+ turbo-ignore:lint: cache hit, replaying output f9501944cf35e2b0
2
+ turbo-ignore:lint: 
3
+ turbo-ignore:lint: > turbo-ignore@0.1.0 lint /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
4
+ turbo-ignore:lint: > eslint src/**/*.ts
5
+ turbo-ignore:lint: 
6
+ turbo-ignore:lint: Warning: 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
+ turbo-ignore:test: cache hit, replaying output 9a464a91e0c65822
2
+ turbo-ignore:test: 
3
+ turbo-ignore:test: > turbo-ignore@0.1.0 test /Users/knickman/Developer/vercel/development/turborepo/packages/turbo-ignore
4
+ turbo-ignore:test: > jest
5
+ turbo-ignore:test: 
6
+ turbo-ignore:test: PASS __tests__/ignore.test.ts
7
+ turbo-ignore:test:  turbo-ignore
8
+ turbo-ignore:test:  getComparison()
9
+ turbo-ignore:test:  ✓ uses headRelative comparison when not running Vercel CI (2 ms)
10
+ turbo-ignore:test:  ✓ returns null when running in Vercel CI with no VERCEL_GIT_PREVIOUS_SHA (1 ms)
11
+ turbo-ignore:test:  ✓ used previousDeploy when running in Vercel CI with VERCEL_GIT_PREVIOUS_SHA
12
+ turbo-ignore:test: 
13
+ turbo-ignore:test: Test Suites: 1 passed, 1 total
14
+ turbo-ignore:test: Tests: 3 passed, 3 total
15
+ turbo-ignore:test: Snapshots: 2 passed, 2 total
16
+ turbo-ignore:test: Time: 1.022 s
17
+ turbo-ignore:test: Ran 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
+ });