-
-
Notifications
You must be signed in to change notification settings - Fork 184
Node-like module resolution #909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
ark120202
wants to merge
61
commits into
TypeScriptToLua:master
from
ark120202:node-module-resolution
Closed
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
6b34308
Node-like module resolution
ark120202 781c286
Basic node_modules resolution support
ark120202 42537d6
Fix binary files git type
ark120202 f168977
Move resolutions tests to `transpile` directory
ark120202 3dd2c7e
Implement `unescapeLuaString`
ark120202 a5597b6
Use `enhanced-resolve` for module resolution
ark120202 113cd29
Add in-memory resolution testing util setup
ark120202 fa25e24
Remove `transpileAndExecuteProjectReturningMainExport` legacy util
ark120202 0695475
Make absolute/relative paths handling more consistent
ark120202 d494d6f
Error on resolution to script files that aren't included in the project
ark120202 6afdc45
Simplify concepts used in module id generation
ark120202 e1a3dfd
Improve terminology
ark120202 1ff2963
Move high-level API to managed.ts
ark120202 f405f67
Refactor
ark120202 ae52da3
Extract Transpilation class into its own file
ark120202 f90befb
EmitHost -> TranspilerHost
ark120202 53ba64e
Pass Transpilation instance as a context
ark120202 deefc88
Move plugin handling to Transpilation class
ark120202 3567987
Add transpilation-related plugin hooks
ark120202 68e7ffa
Treat all resolved extensions expect `.lua` as project members
ark120202 ceff8f2
Move sourcemap handling to chunk level
ark120202 2fa14b8
Refactor
ark120202 a23eeb2
Require `ts-node` on behalf of itself
ark120202 08f8b06
Fix plugin tests
ark120202 7e11569
Remove `resolve` dependency
ark120202 b83e170
Merge remote-tracking branch 'upstream/master' into node-module-resol…
ark120202 6d594a2
Include source snippet in resolution errors
ark120202 db06b6d
modules.spec.ts
ark120202 d2e4172
`load-config-import.spec.ts`
ark120202 c98a98a
Resolve lualib_bundle as a dependency
ark120202 640ff33
Add jest-watch-typeahead
ark120202 52f9fd7
`resolution.spec.ts`
ark120202 70a01a6
Move test fixtures into __fixtures__ directories
ark120202 cf6fdff
Update .eslintignore and .prettierignore
ark120202 d129b3c
Move `lualib_bundle` chunk back to root
ark120202 5bcafb9
Fix sourcemaps when lualib_bundle is used
ark120202 052ac1f
Fix few tests
ark120202 a0fd091
Merge remote-tracking branch 'upstream/master' into node-module-resol…
ark120202 9081fff
Refactor modules.spec.ts
ark120202 1252265
Move some translation tests to unit
ark120202 fbb9f23
Remove `baseUrl` tests
ark120202 260c71d
Use typescript internal api over "path" module for better windows compat
ark120202 f728c17
Move managed-api out of transpilation module
ark120202 f5cdf2c
Remove index from transformation module to signify that it's not public
ark120202 3783d92
Prefer to use options on context objects
ark120202 41dafdd
Move asset emission to Transpilation
ark120202 5e2bbdf
--mode lib
ark120202 cd9f9a6
Transpiler -> Compiler
ark120202 64280d5
Return main transpiled file from `transpileString` itself
ark120202 c042185
`transpileDiagnostics` -> `emitDiagnostics`
ark120202 db9b60a
Make Compilation a public API
ark120202 1d03830
Rename `Module.request` to `Module.fileName`
ark120202 9ccb503
Fix Compilation fail to find unchanged source files in watch mode
ark120202 18fe206
Rename plugin application functions
ark120202 0696901
Use snapshot for printer plugin test
ark120202 5d44f06
Move `executeCommandLine` to `src/cli/execute.ts`
ark120202 7dbb0f7
Fix resolution error diagnostic source file missing some methods
ark120202 2eda42a
Move chunk to files mapping to `chunkToAssets`
ark120202 7f6f2f0
Move out-of-project dependency error to lua resolver error handler
ark120202 f137738
Add JSDoc to `Module` and `Chunk` declarations
ark120202 bbb0c8a
Merge remote-tracking branch 'upstream/master' into node-module-resol…
ark120202 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| /dist | ||
| /test/translation/transformation | ||
| /test/cli/errors | ||
| /test/cli/watch | ||
| /test/transpile/directories | ||
| /test/transpile/outFile | ||
| /test/translation/__fixtures__ | ||
| /test/cli/__fixtures__ | ||
| /test/transpile/__fixtures__/directories |
This file contains hidden or 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,3 +1,3 @@ | ||
| /dist | ||
| /coverage | ||
| /test/translation/transformation/characterEscapeSequence.ts | ||
| /test/translation/__fixtures__/characterEscapeSequence.ts |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this as peer dependency? isn't the regular dev dependency enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an optional peer dependency. It is required for Yarn 2, since it doesn't allow importing unreferenced packages