forked from checkly/checkly-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support wildcard exports when parsing dependency tree [sc-22632] (
checkly#1003) * feat: add a hidden flag to output the project bundle for debug purposes The new flag, `--debug-bundle`, outputs the project bundle payload as-is after the project has been parsed. The bundle is output to a file, by default `./debug-bundle.json`. A different file can be chosen with the new `--debug-bundle-output-file` flag, which is also hidden. * feat: support wildcard exports when parsing code for dependencies Previously only named exports were supported. * feat: use wildcard export in tests Additionally, to make sure that not all files in the tree are getting included automatically (which would have invalidated the wildcard export tests), an unreachable file that should not appear in the list of dependencies was added to the relevant examples.
- Loading branch information
Showing
16 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...cli/src/services/check-parser/__tests__/check-parser-fixtures/common-esm-example/dep5.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './dep6' // wildcard export |
1 change: 1 addition & 0 deletions
1
...cli/src/services/check-parser/__tests__/check-parser-fixtures/common-esm-example/dep6.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const value = 'Hello World' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
.../services/check-parser/__tests__/check-parser-fixtures/common-esm-example/unreachable.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This file is intentionally not reachable from the entrypoint and should | ||
// not appear in the list of dependencies. | ||
|
||
export const unreachable = true |
1 change: 1 addition & 0 deletions
1
...s/cli/src/services/check-parser/__tests__/check-parser-fixtures/esmodules-example/dep5.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './dep6' // wildcard export |
1 change: 1 addition & 0 deletions
1
...s/cli/src/services/check-parser/__tests__/check-parser-fixtures/esmodules-example/dep6.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const value = 'Hello World' |
1 change: 1 addition & 0 deletions
1
...src/services/check-parser/__tests__/check-parser-fixtures/esmodules-example/entrypoint.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import dep2 from './dep2' | ||
import { dep3 } from './dep3' | ||
export { value } from './dep1' | ||
export { value as otherValue } from './dep5' | ||
|
||
/* eslint-disable no-console */ | ||
console.log('Received ', dep2, dep3) |
4 changes: 4 additions & 0 deletions
4
...rc/services/check-parser/__tests__/check-parser-fixtures/esmodules-example/unreachable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This file is intentionally not reachable from the entrypoint and should | ||
// not appear in the list of dependencies. | ||
|
||
export const unreachable = true |
4 changes: 4 additions & 0 deletions
4
...i/src/services/check-parser/__tests__/check-parser-fixtures/simple-example/unreachable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This file is intentionally not reachable from the entrypoint and should | ||
// not appear in the list of dependencies. | ||
|
||
export const unreachable = true |
1 change: 1 addition & 0 deletions
1
.../cli/src/services/check-parser/__tests__/check-parser-fixtures/typescript-example/dep5.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './dep6' // wildcard export |
1 change: 1 addition & 0 deletions
1
.../cli/src/services/check-parser/__tests__/check-parser-fixtures/typescript-example/dep6.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const value = 'Hello World' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...c/services/check-parser/__tests__/check-parser-fixtures/typescript-example/unreachable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This file is intentionally not reachable from the entrypoint and should | ||
// not appear in the list of dependencies. | ||
|
||
export const value = 'Hello World' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters