-
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.
subpath imports for explicit 1:1, concat prefix + suffix scenarios an…
…d conditionals, with fixtures that verify project setup and build result with runtime
- Loading branch information
Adam McKee
committed
Nov 7, 2024
1 parent
ca35659
commit 2852249
Showing
87 changed files
with
1,648 additions
and
481 deletions.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
12 changes: 12 additions & 0 deletions
12
fn_build/fixtures/node/js/http_route/.fixture/build_debug.json
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,12 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": "identical" | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
fn_build/fixtures/node/js/http_route/.fixture/build_release.json
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,14 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": { | ||
"content": "export const DELETE=()=>{console.log(\"delete\")};" | ||
} | ||
} | ||
] | ||
} |
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,13 @@ | ||
{ | ||
"dependencies": "unused", | ||
"sources": [ | ||
{ | ||
"imports": [], | ||
"path": "package.json" | ||
}, | ||
{ | ||
"imports": [], | ||
"path": "routes/data/lambda.js" | ||
} | ||
] | ||
} |
File renamed without changes.
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,3 @@ | ||
{ | ||
"type": "module" | ||
} |
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
fn_build/fixtures/node/js/relative_import/.fixture/build_debug.json
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,16 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "lib/data.js", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": "identical" | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
fn_build/fixtures/node/js/relative_import/.fixture/build_release.json
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,20 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "lib/data.js", | ||
"result": { | ||
"content": "let t=[];export function getData(){return t}" | ||
} | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": { | ||
"content": "import{getData as o}from\"../../lib/data.js\";export const GET=()=>{console.log(\"got\",o())};" | ||
} | ||
} | ||
] | ||
} |
21 changes: 21 additions & 0 deletions
21
fn_build/fixtures/node/js/relative_import/.fixture/parse.json
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,21 @@ | ||
{ | ||
"dependencies": "unused", | ||
"sources": [ | ||
{ | ||
"imports": [], | ||
"path": "package.json" | ||
}, | ||
{ | ||
"imports": [], | ||
"path": "lib/data.js" | ||
}, | ||
{ | ||
"imports": [ | ||
{ | ||
"relativeSource": "lib/data.js" | ||
} | ||
], | ||
"path": "routes/data/lambda.js" | ||
} | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
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,3 @@ | ||
{ | ||
"type": "module" | ||
} |
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
fn_build/fixtures/node/js/subpath_import/conditional_explicit/.fixture/build_debug.json
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,16 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "lib/tla-log.js", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": "identical" | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
fn_build/fixtures/node/js/subpath_import/conditional_explicit/.fixture/build_release.json
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,20 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "lib/tla-log.js", | ||
"result": { | ||
"content": "export function getLog(){return\"log\"}" | ||
} | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": { | ||
"content": "import{getData as o}from\"#data\";import{getLog as t}from\"#log\";export const GET=()=>{console[t()](\"got\",o())};" | ||
} | ||
} | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
fn_build/fixtures/node/js/subpath_import/conditional_explicit/.fixture/parse.json
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,27 @@ | ||
{ | ||
"dependencies": "required", | ||
"sources": [ | ||
{ | ||
"imports": [], | ||
"path": "package.json" | ||
}, | ||
{ | ||
"imports": [], | ||
"path": "lib/tla-log.js" | ||
}, | ||
{ | ||
"imports": [ | ||
{ | ||
"packageDependency": { | ||
"package": "data-dep", | ||
"subpath": null | ||
} | ||
}, | ||
{ | ||
"relativeSource": "lib/tla-log.js" | ||
} | ||
], | ||
"path": "routes/data/lambda.js" | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
fn_build/fixtures/node/js/subpath_import/conditional_explicit/.fixture/spec.json
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,3 @@ | ||
{ | ||
"entrypoint": "routes/data/lambda.js" | ||
} |
3 changes: 3 additions & 0 deletions
3
fn_build/fixtures/node/js/subpath_import/conditional_explicit/lib/data-polyfill.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,3 @@ | ||
export function getData() { | ||
return [] | ||
} |
3 changes: 3 additions & 0 deletions
3
fn_build/fixtures/node/js/subpath_import/conditional_explicit/lib/tla-log.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,3 @@ | ||
export function getLog() { | ||
return 'log' | ||
} |
3 changes: 3 additions & 0 deletions
3
fn_build/fixtures/node/js/subpath_import/conditional_explicit/node_modules/data-dep/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...d/fixtures/node/js/subpath_import/conditional_explicit/node_modules/data-dep/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
fn_build/fixtures/node/js/subpath_import/conditional_explicit/node_modules/log-dep/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...ld/fixtures/node/js/subpath_import/conditional_explicit/node_modules/log-dep/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
fn_build/fixtures/node/js/subpath_import/conditional_explicit/package.json
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,13 @@ | ||
{ | ||
"type": "module", | ||
"imports": { | ||
"#data": { | ||
"node": "data-dep", | ||
"default": "./lib/data-polyfill.js" | ||
}, | ||
"#log": { | ||
"node": "./lib/tla-log.js", | ||
"module-sync": "log-dep" | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
fn_build/fixtures/node/js/subpath_import/conditional_explicit/routes/data/lambda.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,6 @@ | ||
import {getData} from '#data' | ||
import {getLog} from '#log' | ||
|
||
export const GET = () => { | ||
console[getLog()]('got', getData()) | ||
} |
12 changes: 12 additions & 0 deletions
12
fn_build/fixtures/node/js/subpath_import/explicit_dependency/.fixture/build_debug.json
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,12 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": "identical" | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
fn_build/fixtures/node/js/subpath_import/explicit_dependency/.fixture/build_release.json
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,14 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"path": "package.json", | ||
"result": "identical" | ||
}, | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": { | ||
"content": "import{getData as o}from\"#lib/data.js\";export const GET=()=>{console.log(\"got\",o())};" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.