@analogjs/vite-plugin-angular 0.2.0-beta.2 → 0.2.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -81,19 +81,20 @@ function convertTypeScriptDiagnostic(diagnostic) {
|
|
|
81
81
|
}
|
|
82
82
|
// eslint-disable-next-line max-lines-per-function
|
|
83
83
|
function createCompilerPlugin(pluginOptions) {
|
|
84
|
+
let handleJs = false;
|
|
84
85
|
return {
|
|
85
86
|
name: 'angular-compiler',
|
|
86
87
|
// eslint-disable-next-line max-lines-per-function
|
|
87
88
|
setup(build) {
|
|
88
|
-
var _a
|
|
89
|
-
var
|
|
89
|
+
var _a;
|
|
90
|
+
var _b;
|
|
90
91
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
let setupWarnings;
|
|
92
|
+
let setupWarnings = [];
|
|
92
93
|
// Initialize a worker pool for JavaScript transformations
|
|
93
94
|
const javascriptTransformer = new javascript_transformer_1.JavaScriptTransformer(pluginOptions, environment_options_1.maxWorkers);
|
|
94
|
-
const { GLOBAL_DEFS_FOR_TERSER_WITH_AOT
|
|
95
|
+
const { GLOBAL_DEFS_FOR_TERSER_WITH_AOT } = yield aot_compilation_1.AotCompilation.loadCompilerCli();
|
|
95
96
|
// Setup defines based on the values provided by the Angular compiler-cli
|
|
96
|
-
(_a = (
|
|
97
|
+
(_a = (_b = build.initialOptions).define) !== null && _a !== void 0 ? _a : (_b.define = {});
|
|
97
98
|
for (const [key, value] of Object.entries(GLOBAL_DEFS_FOR_TERSER_WITH_AOT)) {
|
|
98
99
|
if (key in build.initialOptions.define) {
|
|
99
100
|
// Skip keys that have been manually provided
|
|
@@ -107,56 +108,18 @@ function createCompilerPlugin(pluginOptions) {
|
|
|
107
108
|
// In this case, all provided values are booleans.
|
|
108
109
|
build.initialOptions.define[key] = value.toString();
|
|
109
110
|
}
|
|
110
|
-
// The tsconfig is loaded in setup instead of in start to allow the esbuild target build option to be modified.
|
|
111
|
-
// esbuild build options can only be modified in setup prior to starting the build.
|
|
112
|
-
const { options: compilerOptions, rootNames, errors: configurationDiagnostics, } = readConfiguration(pluginOptions.tsconfig, {
|
|
113
|
-
noEmitOnError: false,
|
|
114
|
-
suppressOutputPathCheck: true,
|
|
115
|
-
outDir: undefined,
|
|
116
|
-
inlineSources: pluginOptions.sourcemap,
|
|
117
|
-
inlineSourceMap: pluginOptions.sourcemap,
|
|
118
|
-
sourceMap: false,
|
|
119
|
-
mapRoot: undefined,
|
|
120
|
-
sourceRoot: undefined,
|
|
121
|
-
declaration: false,
|
|
122
|
-
declarationMap: false,
|
|
123
|
-
allowEmptyCodegenFiles: false,
|
|
124
|
-
annotationsAs: 'decorators',
|
|
125
|
-
enableResourceInlining: false,
|
|
126
|
-
});
|
|
127
|
-
if (compilerOptions.target === undefined ||
|
|
128
|
-
compilerOptions.target < ts.ScriptTarget.ES2022) {
|
|
129
|
-
// If 'useDefineForClassFields' is already defined in the users project leave the value as is.
|
|
130
|
-
// Otherwise fallback to false due to https://github.com/microsoft/TypeScript/issues/45995
|
|
131
|
-
// which breaks the deprecated `@Effects` NGRX decorator and potentially other existing code as well.
|
|
132
|
-
compilerOptions.target = ts.ScriptTarget.ES2022;
|
|
133
|
-
(_b = compilerOptions.useDefineForClassFields) !== null && _b !== void 0 ? _b : (compilerOptions.useDefineForClassFields = false);
|
|
134
|
-
(setupWarnings !== null && setupWarnings !== void 0 ? setupWarnings : (setupWarnings = [])).push({
|
|
135
|
-
text: 'TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and ' +
|
|
136
|
-
'"false" respectively by the Angular CLI.',
|
|
137
|
-
location: { file: pluginOptions.tsconfig },
|
|
138
|
-
notes: [
|
|
139
|
-
{
|
|
140
|
-
text: 'To control ECMA version and features use the Browerslist configuration. ' +
|
|
141
|
-
'For more information, see https://angular.io/guide/build#configuring-browser-compatibility',
|
|
142
|
-
},
|
|
143
|
-
],
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
111
|
// The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files
|
|
147
112
|
let fileEmitter;
|
|
148
113
|
let compilation;
|
|
149
114
|
build.onStart(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
150
|
-
var _d, _e
|
|
115
|
+
var _c, _d, _e;
|
|
151
116
|
const result = {
|
|
152
117
|
warnings: setupWarnings,
|
|
153
118
|
};
|
|
154
|
-
// Reset the setup warnings so that they are only shown during the first build.
|
|
155
|
-
setupWarnings = undefined;
|
|
156
119
|
// Create Angular compiler host options
|
|
157
120
|
const hostOptions = {
|
|
158
121
|
fileReplacements: pluginOptions.fileReplacements,
|
|
159
|
-
modifiedFiles: (
|
|
122
|
+
modifiedFiles: (_c = pluginOptions.sourceFileCache) === null || _c === void 0 ? void 0 : _c.modifiedFiles,
|
|
160
123
|
sourceFileCache: pluginOptions.sourceFileCache,
|
|
161
124
|
transformStylesheet() {
|
|
162
125
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -168,7 +131,30 @@ function createCompilerPlugin(pluginOptions) {
|
|
|
168
131
|
compilation !== null && compilation !== void 0 ? compilation : (compilation = new aot_compilation_1.AotCompilation());
|
|
169
132
|
// Initialize the Angular compilation for the current build.
|
|
170
133
|
// In watch mode, previous build state will be reused.
|
|
171
|
-
const { affectedFiles } = yield compilation.initialize(
|
|
134
|
+
const { affectedFiles, compilerOptions: { allowJs }, } = yield compilation.initialize(pluginOptions.tsconfig, hostOptions, (compilerOptions) => {
|
|
135
|
+
var _a;
|
|
136
|
+
if (compilerOptions.target === undefined ||
|
|
137
|
+
compilerOptions.target < ts.ScriptTarget.ES2022) {
|
|
138
|
+
// If 'useDefineForClassFields' is already defined in the users project leave the value as is.
|
|
139
|
+
// Otherwise fallback to false due to https://github.com/microsoft/TypeScript/issues/45995
|
|
140
|
+
// which breaks the deprecated `@Effects` NGRX decorator and potentially other existing code as well.
|
|
141
|
+
compilerOptions.target = ts.ScriptTarget.ES2022;
|
|
142
|
+
(_a = compilerOptions.useDefineForClassFields) !== null && _a !== void 0 ? _a : (compilerOptions.useDefineForClassFields = false);
|
|
143
|
+
(setupWarnings !== null && setupWarnings !== void 0 ? setupWarnings : (setupWarnings = [])).push({
|
|
144
|
+
text: 'TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and ' +
|
|
145
|
+
'"false" respectively by the Angular CLI.',
|
|
146
|
+
location: { file: pluginOptions.tsconfig },
|
|
147
|
+
notes: [
|
|
148
|
+
{
|
|
149
|
+
text: 'To control ECMA version and features use the Browerslist configuration. ' +
|
|
150
|
+
'For more information, see https://angular.io/guide/build#configuring-browser-compatibility',
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return Object.assign(Object.assign({}, compilerOptions), { noEmitOnError: false, inlineSources: pluginOptions.sourcemap, inlineSourceMap: pluginOptions.sourcemap, mapRoot: undefined, sourceRoot: undefined });
|
|
156
|
+
});
|
|
157
|
+
handleJs = allowJs;
|
|
172
158
|
// Clear affected files from the cache (if present)
|
|
173
159
|
if (pluginOptions.sourceFileCache) {
|
|
174
160
|
for (const affected of affectedFiles) {
|
|
@@ -179,21 +165,23 @@ function createCompilerPlugin(pluginOptions) {
|
|
|
179
165
|
for (const diagnostic of compilation.collectDiagnostics()) {
|
|
180
166
|
const message = convertTypeScriptDiagnostic(diagnostic);
|
|
181
167
|
if (diagnostic.category === ts.DiagnosticCategory.Error) {
|
|
182
|
-
((
|
|
168
|
+
((_d = result.errors) !== null && _d !== void 0 ? _d : (result.errors = [])).push(message);
|
|
183
169
|
}
|
|
184
170
|
else {
|
|
185
|
-
((
|
|
171
|
+
((_e = result.warnings) !== null && _e !== void 0 ? _e : (result.warnings = [])).push(message);
|
|
186
172
|
}
|
|
187
173
|
}
|
|
188
174
|
fileEmitter = compilation.createFileEmitter();
|
|
175
|
+
// Reset the setup warnings so that they are only shown during the first build.
|
|
176
|
+
setupWarnings = undefined;
|
|
189
177
|
return result;
|
|
190
178
|
}));
|
|
191
179
|
build.onLoad({
|
|
192
|
-
filter:
|
|
180
|
+
filter: handleJs ? /\.[cm]?[jt]sx?$/ : /\.[cm]?tsx?$/,
|
|
193
181
|
}, (args) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
194
|
-
var _g, _h, _j, _k
|
|
182
|
+
var _f, _g, _h, _j, _k;
|
|
195
183
|
assert.ok(fileEmitter, 'Invalid plugin execution order');
|
|
196
|
-
const request = (
|
|
184
|
+
const request = (_g = (_f = pluginOptions.fileReplacements) === null || _f === void 0 ? void 0 : _f[args.path]) !== null && _g !== void 0 ? _g : args.path;
|
|
197
185
|
// only process dependencies
|
|
198
186
|
if (!request.includes('node_modules')) {
|
|
199
187
|
return undefined;
|
|
@@ -202,24 +190,24 @@ function createCompilerPlugin(pluginOptions) {
|
|
|
202
190
|
// the options cannot change and do not need to be represented in the key. If the
|
|
203
191
|
// cache is later stored to disk, then the options that affect transform output
|
|
204
192
|
// would need to be added to the key as well as a check for any change of content.
|
|
205
|
-
let contents = (
|
|
193
|
+
let contents = (_h = pluginOptions.sourceFileCache) === null || _h === void 0 ? void 0 : _h.typeScriptFileCache.get((0, node_url_1.pathToFileURL)(request).href);
|
|
206
194
|
if (contents === undefined) {
|
|
207
195
|
const typescriptResult = yield fileEmitter(request);
|
|
208
196
|
if (!(typescriptResult === null || typescriptResult === void 0 ? void 0 : typescriptResult.content)) {
|
|
209
197
|
// No TS result indicates the file is not part of the TypeScript program.
|
|
210
198
|
// If allowJs is enabled and the file is JS then defer to the next load hook.
|
|
211
|
-
if (
|
|
199
|
+
if (handleJs && /\.[cm]?js$/.test(request)) {
|
|
212
200
|
return undefined;
|
|
213
201
|
}
|
|
214
202
|
// Otherwise return an error
|
|
215
203
|
return {
|
|
216
204
|
errors: [
|
|
217
|
-
createMissingFileError(request, args.path, (
|
|
205
|
+
createMissingFileError(request, args.path, (_j = build.initialOptions.absWorkingDir) !== null && _j !== void 0 ? _j : ''),
|
|
218
206
|
],
|
|
219
207
|
};
|
|
220
208
|
}
|
|
221
209
|
contents = yield javascriptTransformer.transformData(request, typescriptResult.content, true /* skipLinker */);
|
|
222
|
-
(
|
|
210
|
+
(_k = pluginOptions.sourceFileCache) === null || _k === void 0 ? void 0 : _k.typeScriptFileCache.set((0, node_url_1.pathToFileURL)(request).href, contents);
|
|
223
211
|
}
|
|
224
212
|
return {
|
|
225
213
|
contents,
|
|
@@ -227,7 +215,7 @@ function createCompilerPlugin(pluginOptions) {
|
|
|
227
215
|
};
|
|
228
216
|
}));
|
|
229
217
|
build.onLoad({ filter: /\.[cm]?js$/ }, (args) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
230
|
-
var
|
|
218
|
+
var _l, _m;
|
|
231
219
|
// only process dependencies
|
|
232
220
|
if (!args.path.includes('node_modules')) {
|
|
233
221
|
return undefined;
|
|
@@ -236,10 +224,10 @@ function createCompilerPlugin(pluginOptions) {
|
|
|
236
224
|
// the options cannot change and do not need to be represented in the key. If the
|
|
237
225
|
// cache is later stored to disk, then the options that affect transform output
|
|
238
226
|
// would need to be added to the key as well as a check for any change of content.
|
|
239
|
-
let contents = (
|
|
227
|
+
let contents = (_l = pluginOptions.sourceFileCache) === null || _l === void 0 ? void 0 : _l.babelFileCache.get(args.path);
|
|
240
228
|
if (contents === undefined) {
|
|
241
229
|
contents = yield javascriptTransformer.transformFile(args.path);
|
|
242
|
-
(
|
|
230
|
+
(_m = pluginOptions.sourceFileCache) === null || _m === void 0 ? void 0 : _m.babelFileCache.set(args.path, contents);
|
|
243
231
|
}
|
|
244
232
|
return {
|
|
245
233
|
contents,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/compiler-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AASH,sCAAsC;AACtC,qCAAmC;AACnC,kCAAkC;AAClC,uC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;;;;gBAC5B,IAAI,
|
|
1
|
+
{"version":3,"file":"compiler-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/compiler-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AASH,sCAAsC;AACtC,qCAAmC;AACnC,kCAAkC;AAClC,uCAAyC;AACzC,iCAAiC;AAEjC,qGAAyF;AAEzF,wHAAoH;AAEpH,8HAA0H;AAE1H;;;;;;GAMG;AACH,SAAS,+BAA+B,CACtC,IAAqC,EACrC,UAAmB;IAEnB,MAAM,OAAO,GAAG,IAAA,kBAAQ,GAAE,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACvD,IAAI,IAAI,GAAG,EAAE,CAAC,4BAA4B,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACtE,IAAI,UAAU,EAAE;QACd,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC;KAC1B;IAED,MAAM,IAAI,GAAgB,EAAE,IAAI,EAAE,CAAC;IAEnC,IAAI,IAAI,CAAC,IAAI,EAAE;QACb,IAAI,CAAC,QAAQ,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;QAEF,4FAA4F;QAC5F,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,6BAA6B,CAC1D,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,KAAK,CACX,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC;YAC9B,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;YAEjC,4EAA4E;YAC5E,MAAM,iBAAiB,GAAG,EAAE,CAAC,6BAA6B,CACxD,IAAI,CAAC,IAAI,EACT,IAAI,EACJ,CAAC,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