Commit d088b15
feat: add webpack 4 support to ts-loader v9 (#1697)
* feat: widen webpack peer support
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/74b74f2d-76ad-4022-9635-77d0c5acce76
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: plan isWebpack5 refactor
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/e322b7ed-e010-4d60-9a2d-3672c9d55324
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: propagate webpack major version through instance flow
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/55527c90-acbb-42e1-b384-95f6fdfe9283
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: use instance.isWebpack5 consistently for strategy decisions
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/84c8d79e-30f1-46f5-baf3-bc669466d3ba
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: localize webpack5 detection to instance setup
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/faa27c75-efcd-4e5a-8062-443dce3bf610
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: use module methods directly in webpack5 error cleanup
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/5d863b98-4c30-478e-8205-7c3a7387b0f1
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* Apply suggestion from @johnnyreilly
* refactor: consolidate webpack5 build dependency registration
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/f0ead9d8-6749-4f8c-9b23-a5989c21dcbe
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* fix: add getLoaderOptions webpack 4 changes
* fix: resolve src/index.ts webpack4 loader options regression
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/e3bff588-a014-408c-b189-25f3f9f840ae
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: make loader-utils optional peer for webpack4 path
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/7890d2b2-6ade-4dc1-9ea6-6bf89c4a60de
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* fix: investigate and address failing webpack4 and comparison tests
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/584f3756-84fa-48c5-b740-30f99f1002d6
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: loaderOptions separate file
* refactor: use isWebpack5 in after-compile module mapping
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/6940b64c-bb0d-431f-b8cf-7e83f58ff811
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: derive and reuse isWebpack5 in index loader
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/45ce3f0d-3ab9-47ff-8520-23271ab092af
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* refactor: pass isWebpack5 into instance creation flow
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/80f981d4-a9e6-4dce-8da0-93e82749d5f2
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* fix: restore comparison outputs and normalize ts-loader module errors
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/018a7a6f-9335-4dc8-a21d-32da8f812c6b
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: inline require
* chore: reduce number of tested versions
* chore: exclude test to see if fixes webpack 4
* chore: introduce minimum webpack version
* chore: lockfile
* fix: build
* fix: check is object
* chore: upgrade eslint
* fix: tidy
* Revert "chore: lockfile"
This reverts commit 7878c8f.
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* fix: restore module error guard in after-compile
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/72a9d59f-c15a-451b-a293-48ee4ddae4e6
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: drop unintended yarn.lock changes
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/72a9d59f-c15a-451b-a293-48ee4ddae4e6
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/72a9d59f-c15a-451b-a293-48ee4ddae4e6
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* fix: pin @types/eslint to unblock CI type checks
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/6c6888a9-7744-4fee-b616-05f505226581
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: comment some stuff
* fix: restore moduleHasErrors guard in after-compile
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/caa59e7e-b86c-4051-9d2e-f6f6bea4b768
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: revert unintended yarn.lock changes
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/caa59e7e-b86c-4051-9d2e-f6f6bea4b768
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: update progress after moduleHasErrors reply
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/caa59e7e-b86c-4051-9d2e-f6f6bea4b768
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: revert unintended lockfile re-add
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/caa59e7e-b86c-4051-9d2e-f6f6bea4b768
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* docs(changelog): add 9.6.0 entry for webpack 4 support feature
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/5ab3e8ae-31b4-4a96-917d-adcd027e3593
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: revert unintended yarn.lock changes
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/5ab3e8ae-31b4-4a96-917d-adcd027e3593
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* chore: input fiddling
* fix: make isWebpack5 a shared constant
* fix: add back webpack 5 check
* chore: lock file
* fix: stabilize nodeModulesMeaningfulErrorWhenImportingTs comparison output
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/df34fd80-1718-4769-8f01-fbc15f96c807
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* fix: restore lockfile resolution to unblock comparison tests
Agent-Logs-Url: https://github.com/TypeStrong/ts-loader/sessions/22ab19a4-eb4b-4cf6-8efc-423776e48f2d
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
* fix: do not use feature detection
* fix: invalid output for test
* fix: remove hallucinations
* chore: update eslint
* fix: remove more hallucinations / add min ts version to matrix
* fix: webpack 4
* chore: drop old
* fix: make loader-utils * as a peerDependencies
* fix: watchRun should cater for webpack 4 dates
* fix: webpack 4 errors
* fix: lint
* fix: loaderSource -> details
* fix: WebpackError wouldn't work for webpack 4
* fix: nits
* fix: whoops
* fix: do not use SourceMapConsumer if correct version not available
* chore: experiment removing resourceResolveData
* fix: guard module.addError for webpack 4
* feat: add common addErrorToModule
* chore: CHANGELOG
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: johnnyreilly <1010525+johnnyreilly@users.noreply.github.com>
Co-authored-by: John Reilly <johnny_reilly@hotmail.com>1 parent e714be1 commit d088b15
42 files changed
Lines changed: 1523 additions & 1170 deletions
File tree
- .github/workflows
- .vscode
- src
- test
- comparison-tests
- nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput
- execution-tests
- 4.7.0_5.0.0_node16-file-suffix
- src
- test
- 5.6.2_5.0.0_optionsCaching
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | | - | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| |||
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
| 89 | + | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
| |||
0 commit comments