-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
engage typescript conditions when typescript parent path is detected
- Loading branch information
1 parent
18c670b
commit 8c98b65
Showing
12 changed files
with
62 additions
and
8 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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
tests/tests-basic/workspaces/a/package.json → ...sts-basic/workspaces-js/js-a/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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "a", | ||
"name": "js-a", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"main": "index.js" | ||
|
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
tests/tests-basic/workspaces/b/package.json → ...sts-basic/workspaces-js/js-b/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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"name": "b", | ||
"name": "js-b", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"test": "node --experimental-import-meta-resolve --test" | ||
}, | ||
"dependencies": { | ||
"a": "^0.0.0" | ||
"js-a": "^0.0.0" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function foo () { | ||
return 'foo' | ||
} |
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 @@ | ||
{ | ||
"name": "ts-a", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"main": "index.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,5 @@ | ||
import {foo} from 'a' | ||
|
||
export default function test () { | ||
return foo() | ||
} |
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 @@ | ||
{ | ||
"name": "ts-b", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"test": "node --loader=ts-node/esm --test test.ts" | ||
}, | ||
"dependencies": { | ||
"ts-a": "^0.0.0" | ||
}, | ||
"devDependencies": { | ||
"ts-node": "^10.9.1" | ||
} | ||
} |
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 @@ | ||
import test from 'node:test' | ||
import assert from 'node:assert/strict' | ||
import resolvewithplus from '../../../../resolvewithplus.js' | ||
|
||
console.log('test here!') | ||
/* | ||
test('should return workspace paths', () => { | ||
assert.strictEqual( | ||
import.meta.resolve('ts-a'), | ||
resolvewithplus('ts-a')) | ||
}) | ||
*/ |
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,8 @@ | ||
{ | ||
"esm": true, | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"module": "ESNext", | ||
"moduleResolution": "node" | ||
} | ||
} |