@workflow/builders 4.0.1-beta.21 → 4.0.1-beta.23

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.
@@ -1,49 +1,60 @@
1
+ import { mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync, } from 'node:fs';
2
+ import { tmpdir } from 'node:os';
3
+ import { join, relative, resolve } from 'node:path';
4
+ // Resolve symlinks in tmpdir to avoid macOS /var -> /private/var issues
5
+ const realTmpdir = realpathSync(tmpdir());
1
6
  import * as esbuild from 'esbuild';
2
7
  import { describe, expect, it } from 'vitest';
3
- import { createNodeModuleErrorPlugin } from './node-module-esbuild-plugin.js';
4
- describe('workflow-node-module-error plugin', () => {
5
- it('should error on fs import', async () => {
6
- const testCode = `
7
- import { readFile } from "fs";
8
- export function workflow() {
9
- return readFile("test.txt");
10
- }
11
- `;
12
- await expect(esbuild.build({
13
- stdin: {
14
- contents: testCode,
15
- resolveDir: process.cwd(),
16
- sourcefile: 'test-workflow.ts',
17
- loader: 'ts',
18
- },
8
+ import { createNodeModuleErrorPlugin, escapeRegExp, getImportedIdentifier, getPackageName, getViolationLocation, } from './node-module-esbuild-plugin.js';
9
+ async function buildWorkflowWithViolation(source, overrides = {}) {
10
+ const tempDir = mkdtempSync(join(realTmpdir, 'node-module-plugin-test-'));
11
+ const entryFile = join(tempDir, 'workflow.ts');
12
+ writeFileSync(entryFile, source);
13
+ const relativeEntry = relative(process.cwd(), entryFile);
14
+ try {
15
+ await esbuild.build({
16
+ entryPoints: [entryFile],
19
17
  bundle: true,
20
18
  write: false,
21
19
  platform: 'neutral',
22
- plugins: [createNodeModuleErrorPlugin()],
23
20
  logLevel: 'silent',
24
- })).rejects.toThrow(/Cannot use Node\.js module "fs"/);
25
- });
26
- it('should error on path import', async () => {
21
+ plugins: [createNodeModuleErrorPlugin(), ...(overrides.plugins ?? [])],
22
+ ...overrides,
23
+ });
24
+ throw new Error('Expected build to fail');
25
+ }
26
+ catch (error) {
27
+ if (error && typeof error === 'object' && 'errors' in error) {
28
+ return {
29
+ failure: error,
30
+ relativeEntry,
31
+ };
32
+ }
33
+ throw error;
34
+ }
35
+ finally {
36
+ rmSync(tempDir, { recursive: true, force: true });
37
+ }
38
+ }
39
+ describe('workflow-node-module-error plugin', () => {
40
+ it('should error on fs import', async () => {
27
41
  const testCode = `
28
- import { join } from "path";
42
+ import { readFile } from "fs";
29
43
  export function workflow() {
30
- return join("a", "b");
44
+ return readFile("test.txt");
31
45
  }
32
46
  `;
33
- await expect(esbuild.build({
34
- stdin: {
35
- contents: testCode,
36
- resolveDir: process.cwd(),
37
- sourcefile: 'test-workflow.ts',
38
- loader: 'ts',
39
- },
40
- format: 'cjs',
41
- bundle: true,
42
- write: false,
43
- platform: 'neutral',
44
- plugins: [createNodeModuleErrorPlugin()],
45
- logLevel: 'silent',
46
- })).rejects.toThrow(/Cannot use Node\.js module "path"/);
47
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode);
48
+ expect(failure.errors).toHaveLength(1);
49
+ const violation = failure.errors[0];
50
+ expect(violation.text).toContain('You are attempting to use "fs" which is a Node.js module');
51
+ expect(violation.location).toMatchObject({
52
+ file: relativeEntry,
53
+ suggestion: 'Move this function into a step function.',
54
+ });
55
+ expect(violation.location?.line).toBeGreaterThan(0);
56
+ expect(violation.location?.column).toBeGreaterThanOrEqual(0);
57
+ expect(violation.location?.lineText).toContain('readFile');
47
58
  });
48
59
  it('should error on node: prefixed imports', async () => {
49
60
  const testCode = `
@@ -52,20 +63,15 @@ describe('workflow-node-module-error plugin', () => {
52
63
  return readFile;
53
64
  }
54
65
  `;
55
- await expect(esbuild.build({
56
- stdin: {
57
- contents: testCode,
58
- resolveDir: process.cwd(),
59
- sourcefile: 'test-workflow.ts',
60
- loader: 'ts',
61
- },
62
- bundle: true,
63
- write: false,
64
- platform: 'neutral',
65
- format: 'cjs',
66
- plugins: [createNodeModuleErrorPlugin()],
67
- logLevel: 'silent',
68
- })).rejects.toThrow(/Cannot use Node\.js module/);
66
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode, { format: 'cjs' });
67
+ expect(failure.errors).toHaveLength(1);
68
+ const violation = failure.errors[0];
69
+ expect(violation.text).toContain('You are attempting to use "node:fs" which is a Node.js module');
70
+ expect(violation.location).toMatchObject({
71
+ file: relativeEntry,
72
+ suggestion: 'Move this function into a step function.',
73
+ });
74
+ expect(violation.location?.lineText).toContain('readFile');
69
75
  });
70
76
  it('should error on multiple Node.js imports', async () => {
71
77
  const testCode = `
@@ -75,124 +81,319 @@ describe('workflow-node-module-error plugin', () => {
75
81
  return readFile(join("a", "b"));
76
82
  }
77
83
  `;
78
- const result = esbuild.build({
79
- stdin: {
80
- contents: testCode,
81
- resolveDir: process.cwd(),
82
- sourcefile: 'test-workflow.ts',
83
- loader: 'ts',
84
- },
85
- format: 'cjs',
86
- bundle: true,
87
- write: false,
88
- platform: 'neutral',
89
- plugins: [createNodeModuleErrorPlugin()],
90
- logLevel: 'silent',
84
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode, { format: 'cjs' });
85
+ expect(failure.errors).toHaveLength(2);
86
+ const packages = failure.errors.map((error) => ({
87
+ text: error.text,
88
+ location: error.location,
89
+ }));
90
+ const fsViolation = packages.find((pkg) => pkg.text.includes('"fs"'));
91
+ const pathViolation = packages.find((pkg) => pkg.text.includes('"path"'));
92
+ expect(fsViolation?.text).toContain('which is a Node.js module');
93
+ expect(pathViolation?.text).toContain('which is a Node.js module');
94
+ expect(fsViolation?.location).toMatchObject({
95
+ file: relativeEntry,
96
+ suggestion: 'Move this function into a step function.',
91
97
  });
92
- await expect(result).rejects.toThrow();
93
- // Verify we get errors for both imports
98
+ expect(fsViolation?.location?.lineText).toContain('readFile');
99
+ expect(pathViolation?.location).toMatchObject({
100
+ file: relativeEntry,
101
+ suggestion: 'Move this function into a step function.',
102
+ });
103
+ expect(pathViolation?.location?.lineText).toContain('join');
104
+ });
105
+ it('should show top-level package name for nested Node.js imports', async () => {
106
+ // This test validates that when a package in node_modules internally uses
107
+ // Node.js built-in modules, the error message shows the top-level package name
108
+ // (e.g., "fake-package") instead of the internal built-in (e.g., "stream").
109
+ //
110
+ // We create a real node_modules directory structure to simulate this scenario.
111
+ const tempDir = mkdtempSync(join(realTmpdir, 'node-module-plugin-test-'));
112
+ const nodeModulesDir = join(tempDir, 'node_modules', 'fake-package');
113
+ const { mkdirSync } = await import('node:fs');
114
+ mkdirSync(nodeModulesDir, { recursive: true });
115
+ const fakePackageCode = `
116
+ import { Stream } from "stream";
117
+ export function fakePackage() {
118
+ return new Stream();
119
+ }
120
+ `;
121
+ writeFileSync(join(nodeModulesDir, 'index.js'), fakePackageCode);
122
+ writeFileSync(join(nodeModulesDir, 'package.json'), JSON.stringify({ name: 'fake-package', main: 'index.js' }));
123
+ const testCode = `
124
+ import { fakePackage } from "fake-package";
125
+ export function workflow() {
126
+ return fakePackage();
127
+ }
128
+ `;
129
+ const entryFile = join(tempDir, 'workflow.ts');
130
+ writeFileSync(entryFile, testCode);
131
+ const relativeEntry = relative(process.cwd(), entryFile);
94
132
  try {
95
- await result;
133
+ await esbuild.build({
134
+ entryPoints: [entryFile],
135
+ bundle: true,
136
+ write: false,
137
+ platform: 'neutral',
138
+ logLevel: 'silent',
139
+ plugins: [createNodeModuleErrorPlugin()],
140
+ });
141
+ throw new Error('Expected build to fail');
96
142
  }
97
143
  catch (error) {
98
- expect(error.message).toMatch(/fs/);
99
- expect(error.message).toMatch(/path/);
144
+ if (error && typeof error === 'object' && 'errors' in error) {
145
+ const failure = error;
146
+ expect(failure.errors).toHaveLength(1);
147
+ const violation = failure.errors[0];
148
+ // Should mention the top-level package "fake-package", not the internal "stream" module
149
+ expect(violation.text).toContain('"fake-package"');
150
+ expect(violation.text).toContain('which depends on Node.js modules');
151
+ expect(violation.text).not.toContain('"stream"');
152
+ expect(violation.location).toMatchObject({
153
+ file: relativeEntry,
154
+ });
155
+ }
156
+ else {
157
+ throw error;
158
+ }
159
+ }
160
+ finally {
161
+ rmSync(tempDir, { recursive: true, force: true });
100
162
  }
101
163
  });
102
- it('should allow non-Node.js npm package imports', async () => {
164
+ it('should find usage of namespace imports', async () => {
103
165
  const testCode = `
104
- // This should NOT error - it's not a built-in Node.js module
105
- import { someFunction } from "some-random-package";
166
+ import * as fs from "fs";
106
167
  export function workflow() {
107
- return "ok";
168
+ return fs.readFile("test.txt");
108
169
  }
109
170
  `;
110
- // This will fail because the package doesn't exist, but it shouldn't
111
- // fail with our plugin's error message
112
- await expect(esbuild.build({
113
- stdin: {
114
- contents: testCode,
115
- resolveDir: process.cwd(),
116
- sourcefile: 'test-workflow.ts',
117
- loader: 'ts',
118
- },
119
- bundle: true,
120
- write: false,
121
- platform: 'neutral',
122
- plugins: [createNodeModuleErrorPlugin()],
123
- logLevel: 'silent',
124
- external: ['some-random-package'], // Mark as external so it doesn't fail resolution
125
- })).resolves.toBeDefined();
171
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode);
172
+ expect(failure.errors).toHaveLength(1);
173
+ const violation = failure.errors[0];
174
+ expect(violation.text).toContain('"fs" which is a Node.js module');
175
+ expect(violation.location).toMatchObject({
176
+ file: relativeEntry,
177
+ });
178
+ expect(violation.location?.lineText).toContain('fs.readFile');
126
179
  });
127
- it('should allow packages with subpaths that contain built-in module names', async () => {
128
- // This is the false positive case from the real issue:
129
- // "eventsource-parser/stream" should NOT be flagged as the built-in "stream" module
180
+ it('should find usage of default imports', async () => {
130
181
  const testCode = `
131
- import { EventSourceParserStream } from "eventsource-parser/stream";
182
+ import fs from "fs";
132
183
  export function workflow() {
133
- return "ok";
184
+ return fs.readFile("test.txt");
134
185
  }
135
186
  `;
136
- await expect(esbuild.build({
137
- stdin: {
138
- contents: testCode,
139
- resolveDir: process.cwd(),
140
- sourcefile: 'test-workflow.ts',
141
- loader: 'ts',
142
- },
143
- bundle: true,
144
- write: false,
145
- platform: 'neutral',
146
- plugins: [createNodeModuleErrorPlugin()],
147
- logLevel: 'silent',
148
- external: ['eventsource-parser'], // Mark as external so it doesn't fail resolution
149
- })).resolves.toBeDefined();
187
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode);
188
+ expect(failure.errors).toHaveLength(1);
189
+ const violation = failure.errors[0];
190
+ expect(violation.text).toContain('"fs" which is a Node.js module');
191
+ expect(violation.location).toMatchObject({
192
+ file: relativeEntry,
193
+ });
194
+ expect(violation.location?.lineText).toContain('fs.readFile');
150
195
  });
151
- it('should error on Node.js imports from nested npm packages', async () => {
152
- // This simulates what happens when a package like @supabase/supabase-js
153
- // internally imports Node.js built-ins. The key is that the import path
154
- // needs to look like it's coming from node_modules
196
+ it('should find usage of aliased imports', async () => {
155
197
  const testCode = `
156
- // Simulating a fake npm package that uses Node.js built-ins
157
- import { fakePackage } from "./fake-package";
198
+ import { readFile as read } from "fs";
158
199
  export function workflow() {
159
- return fakePackage();
200
+ return read("test.txt");
160
201
  }
161
202
  `;
162
- const fakePackageCode = `
163
- // This simulates @supabase/node-fetch or similar packages
164
- import { Stream } from "stream";
165
- export function fakePackage() {
166
- return new Stream();
203
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode);
204
+ expect(failure.errors).toHaveLength(1);
205
+ const violation = failure.errors[0];
206
+ expect(violation.text).toContain('"fs" which is a Node.js module');
207
+ expect(violation.location).toMatchObject({
208
+ file: relativeEntry,
209
+ });
210
+ // Should point to the aliased identifier "read", not "readFile"
211
+ expect(violation.location?.lineText).toContain('read(');
212
+ });
213
+ it('should not error when import is unused (tree-shaken)', async () => {
214
+ // Note: esbuild tree-shakes unused imports, so they never trigger resolution.
215
+ // This is expected behavior - if the import isn't used, the module won't be bundled.
216
+ const testCode = `
217
+ import { readFile } from "fs";
218
+ export function workflow() {
219
+ return "no fs usage";
167
220
  }
168
221
  `;
169
- // Create a virtual plugin to provide the fake package
170
- const virtualModulePlugin = {
171
- name: 'virtual-fake-package',
172
- setup(build) {
173
- build.onResolve({ filter: /^\.\/fake-package$/ }, () => ({
174
- path: '/some/path/node_modules/fake-package/index.js', // Make it look like node_modules
175
- namespace: 'fake-ns',
176
- }));
177
- build.onLoad({ filter: /.*/, namespace: 'fake-ns' }, () => ({
178
- contents: fakePackageCode,
179
- loader: 'ts',
180
- }));
181
- },
182
- };
183
- await expect(esbuild.build({
184
- stdin: {
185
- contents: testCode,
186
- resolveDir: process.cwd(),
187
- sourcefile: 'test-workflow.ts',
188
- loader: 'ts',
189
- },
190
- bundle: true,
191
- write: false,
192
- platform: 'neutral',
193
- plugins: [virtualModulePlugin, createNodeModuleErrorPlugin()],
194
- logLevel: 'silent',
195
- })).rejects.toThrow(/Cannot use Node\.js module "stream"/);
222
+ const tempDir = mkdtempSync(join(realTmpdir, 'node-module-plugin-test-'));
223
+ const entryFile = join(tempDir, 'workflow.ts');
224
+ writeFileSync(entryFile, testCode);
225
+ try {
226
+ // Build should succeed because unused imports are tree-shaken
227
+ const result = await esbuild.build({
228
+ entryPoints: [entryFile],
229
+ bundle: true,
230
+ write: false,
231
+ platform: 'neutral',
232
+ logLevel: 'silent',
233
+ plugins: [createNodeModuleErrorPlugin()],
234
+ });
235
+ expect(result.errors).toHaveLength(0);
236
+ }
237
+ finally {
238
+ rmSync(tempDir, { recursive: true, force: true });
239
+ }
240
+ });
241
+ it('should error on Bun module imports', async () => {
242
+ const testCode = `
243
+ import { serve } from "bun";
244
+ export function workflow() {
245
+ return serve({ port: 3000 });
246
+ }
247
+ `;
248
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode);
249
+ expect(failure.errors).toHaveLength(1);
250
+ const violation = failure.errors[0];
251
+ expect(violation.text).toContain('"bun" which is a Bun module');
252
+ expect(violation.text).toContain('Bun modules are not available');
253
+ expect(violation.location).toMatchObject({
254
+ file: relativeEntry,
255
+ });
256
+ });
257
+ it('should error on Bun subpath imports', async () => {
258
+ const testCode = `
259
+ import { Database } from "bun:sqlite";
260
+ export function workflow() {
261
+ return new Database("test.db");
262
+ }
263
+ `;
264
+ const { failure, relativeEntry } = await buildWorkflowWithViolation(testCode);
265
+ expect(failure.errors).toHaveLength(1);
266
+ const violation = failure.errors[0];
267
+ expect(violation.text).toContain('"bun:sqlite" which is a Bun module');
268
+ expect(violation.text).toContain('Bun modules are not available');
269
+ expect(violation.location).toMatchObject({
270
+ file: relativeEntry,
271
+ });
272
+ });
273
+ });
274
+ describe('workflow-node-module-error helper functions', () => {
275
+ describe('getPackageName', () => {
276
+ it('should get the package name from simple node_modules path', () => {
277
+ const packageName = getPackageName('/Users/adrianlam/GitHub/workflow/node_modules/node-fetch/src/index.js');
278
+ expect(packageName).toBe('node-fetch');
279
+ });
280
+ it('should get the package name from pnpm nested path', () => {
281
+ const packageName = getPackageName('/Users/adrianlam/GitHub/workflow/node_modules/.pnpm/node-fetch@3.3.2/node_modules/node-fetch/src/index.js');
282
+ expect(packageName).toBe('node-fetch');
283
+ });
284
+ it('should get scoped package name', () => {
285
+ const packageName = getPackageName('/project/node_modules/@supabase/supabase-js/dist/index.js');
286
+ expect(packageName).toBe('@supabase/supabase-js');
287
+ });
288
+ it('should return null for paths without node_modules', () => {
289
+ const packageName = getPackageName('/Users/adrianlam/GitHub/workflow/src/index.js');
290
+ expect(packageName).toBeNull();
291
+ });
292
+ });
293
+ describe('escapeRegExp', () => {
294
+ it('should escape regex special characters', () => {
295
+ expect(escapeRegExp('test.file')).toBe('test\\.file');
296
+ expect(escapeRegExp('test*file')).toBe('test\\*file');
297
+ expect(escapeRegExp('test+file')).toBe('test\\+file');
298
+ expect(escapeRegExp('test?file')).toBe('test\\?file');
299
+ expect(escapeRegExp('test^file')).toBe('test\\^file');
300
+ expect(escapeRegExp('test$file')).toBe('test\\$file');
301
+ });
302
+ it('should escape brackets and braces', () => {
303
+ expect(escapeRegExp('test{file}')).toBe('test\\{file\\}');
304
+ expect(escapeRegExp('test[file]')).toBe('test\\[file\\]');
305
+ expect(escapeRegExp('test(file)')).toBe('test\\(file\\)');
306
+ });
307
+ it('should escape pipes and backslashes', () => {
308
+ expect(escapeRegExp('test|file')).toBe('test\\|file');
309
+ expect(escapeRegExp('test\\file')).toBe('test\\\\file');
310
+ });
311
+ it('should handle strings without special characters', () => {
312
+ expect(escapeRegExp('testfile')).toBe('testfile');
313
+ expect(escapeRegExp('test-file')).toBe('test-file');
314
+ });
315
+ it('should handle package names with special characters', () => {
316
+ expect(escapeRegExp('@supabase/supabase-js')).toBe('@supabase/supabase-js');
317
+ expect(escapeRegExp('package.name')).toBe('package\\.name');
318
+ });
319
+ });
320
+ describe('getImportedIdentifier', () => {
321
+ it('should extract namespace import identifier', () => {
322
+ expect(getImportedIdentifier('* as fs')).toBe('fs');
323
+ expect(getImportedIdentifier('* as path')).toBe('path');
324
+ });
325
+ it('should extract first named import', () => {
326
+ expect(getImportedIdentifier('{ readFile }')).toBe('readFile');
327
+ expect(getImportedIdentifier('{ readFile, writeFile }')).toBe('readFile');
328
+ });
329
+ it('should extract aliased named import', () => {
330
+ expect(getImportedIdentifier('{ readFile as read }')).toBe('read');
331
+ expect(getImportedIdentifier('{ readFile as read, writeFile }')).toBe('read');
332
+ });
333
+ it('should extract default import', () => {
334
+ expect(getImportedIdentifier('fs')).toBe('fs');
335
+ expect(getImportedIdentifier('myDefault')).toBe('myDefault');
336
+ });
337
+ it('should extract first identifier from mixed imports', () => {
338
+ // The function checks for braces first, so it extracts from named imports
339
+ expect(getImportedIdentifier('fs, { readFile }')).toBe('readFile');
340
+ expect(getImportedIdentifier('defaultExport, { named }')).toBe('named');
341
+ });
342
+ it('should handle whitespace variations', () => {
343
+ expect(getImportedIdentifier(' { readFile } ')).toBe('readFile');
344
+ expect(getImportedIdentifier('{readFile}')).toBe('readFile');
345
+ expect(getImportedIdentifier('{ readFile , writeFile }')).toBe('readFile');
346
+ });
347
+ it('should handle complex named imports', () => {
348
+ expect(getImportedIdentifier('type { ReadStream }')).toBe('ReadStream');
349
+ expect(getImportedIdentifier('{ default as fs }')).toBe('fs');
350
+ });
351
+ it('should return undefined for edge cases', () => {
352
+ expect(getImportedIdentifier('*')).toBeUndefined();
353
+ expect(getImportedIdentifier('')).toBeUndefined();
354
+ // Empty braces should return undefined since there's no valid identifier
355
+ expect(getImportedIdentifier('{}')).toBeUndefined();
356
+ });
357
+ });
358
+ describe('getViolationLocation', () => {
359
+ it('should find violation location for package name that appears in file', async () => {
360
+ // Use the actual monorepo root as cwd
361
+ const cwd = process.cwd();
362
+ const testFile = 'src/node-module-esbuild-plugin.test.ts';
363
+ // Test with 'vitest' which is actually imported in this file
364
+ const location = await getViolationLocation(cwd, testFile, 'vitest');
365
+ // The function should find 'vitest' in the import statement
366
+ expect(location).toBeDefined();
367
+ expect(location?.file).toBe(testFile);
368
+ const contents = readFileSync(resolve(cwd, testFile), 'utf8');
369
+ const lines = contents.split(/\r?\n/);
370
+ const expectedLine = lines.findIndex((line) => line.includes(`describe(`)) + 1;
371
+ expect(location?.line).toBe(expectedLine);
372
+ expect(location?.column).toBe(0);
373
+ expect(location?.lineText).toContain(`describe(`);
374
+ expect(location?.length).toBe(8);
375
+ });
376
+ it('should return undefined for non-existent files', async () => {
377
+ const cwd = process.cwd();
378
+ const location = await getViolationLocation(cwd, 'non-existent-file.ts', 'some-package');
379
+ expect(location).toBeUndefined();
380
+ });
381
+ it('should return undefined for files without the package import', async () => {
382
+ const cwd = process.cwd();
383
+ const testFile = 'src/node-module-esbuild-plugin.test.ts';
384
+ // This package is not imported in the test file
385
+ const location = await getViolationLocation(cwd, testFile, 'non-existent-package');
386
+ expect(location).toBeUndefined();
387
+ });
388
+ it('should return undefined when import is unused even if it can be parsed', async () => {
389
+ const cwd = process.cwd();
390
+ const testFile = 'src/node-module-esbuild-plugin.test.ts';
391
+ // Test with 'node:http' which is imported in this file but never used
392
+ const location = await getViolationLocation(cwd, testFile, 'node:http');
393
+ // Since the identifier is never referenced (only imported), we should
394
+ // not produce a location preview.
395
+ expect(location).toBeUndefined();
396
+ });
196
397
  });
197
398
  });
198
399
  //# sourceMappingURL=node-module-esbuild-plugin.test.js.map
@@ -1 +1 @@
1
-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wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAsMjE"}
1
+ {"version":3,"file":"swc-esbuild-plugin.d.ts","sourceRoot":"","sources":["../src/swc-esbuild-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAMlC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAsCD,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAsMjE"}
@@ -11,7 +11,18 @@ const NODE_RESOLVE_OPTIONS = {
11
11
  importsFields: ['imports'],
12
12
  conditionNames: ['node', 'require'],
13
13
  descriptionFiles: ['package.json'],
14
- extensions: ['.ts', '.mts', '.cjs', '.js', '.json', '.node'],
14
+ extensions: [
15
+ '.ts',
16
+ '.tsx',
17
+ '.mts',
18
+ '.cts',
19
+ '.cjs',
20
+ '.mjs',
21
+ '.js',
22
+ '.jsx',
23
+ '.json',
24
+ '.node',
25
+ ],
15
26
  enforceExtensions: false,
16
27
  symlinks: true,
17
28
  mainFields: ['main'],