ts-swc-transform 2.0.0 → 2.0.2

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.
Files changed (41) hide show
  1. package/dist/cjs/workers/transformDirectory.js.map +1 -1
  2. package/dist/cjs/workers/transformTypes.js.map +1 -1
  3. package/dist/esm/constants.d.ts +7 -0
  4. package/dist/esm/createMatcher.d.ts +3 -0
  5. package/dist/esm/index.d.ts +8 -0
  6. package/dist/esm/lib/patchCJS.d.ts +2 -0
  7. package/dist/esm/lib/patchESM.d.ts +1 -0
  8. package/dist/esm/lib/swcPrepareOptions.d.ts +2 -0
  9. package/dist/esm/lib/transformFile.d.ts +1 -0
  10. package/dist/esm/lib/url-file-url.d.ts +3 -0
  11. package/dist/esm/loadTsConfig.d.ts +3 -0
  12. package/dist/esm/resolveFileSync.d.ts +2 -0
  13. package/dist/esm/toPath.d.ts +2 -0
  14. package/dist/esm/transformDirectory.d.ts +10 -0
  15. package/dist/esm/transformSync.d.ts +9 -0
  16. package/dist/esm/transformTypes.d.ts +9 -0
  17. package/dist/esm/types.d.ts +13 -0
  18. package/dist/esm/workers/transformDirectory.d.ts +1 -0
  19. package/dist/esm/workers/transformDirectory.js.map +1 -1
  20. package/dist/esm/workers/transformSync.d.ts +2 -0
  21. package/dist/esm/workers/transformTypes.d.ts +1 -0
  22. package/dist/esm/workers/transformTypes.js.map +1 -1
  23. package/package.json +4 -4
  24. /package/dist/{esm/constants.d.mts → cjs/constants.d.ts} +0 -0
  25. /package/dist/{esm/createMatcher.d.mts → cjs/createMatcher.d.ts} +0 -0
  26. /package/dist/{esm/index.d.mts → cjs/index.d.ts} +0 -0
  27. /package/dist/{esm/lib/patchCJS.d.mts → cjs/lib/patchCJS.d.ts} +0 -0
  28. /package/dist/{esm/lib/patchESM.d.mts → cjs/lib/patchESM.d.ts} +0 -0
  29. /package/dist/{esm/lib/swcPrepareOptions.d.mts → cjs/lib/swcPrepareOptions.d.ts} +0 -0
  30. /package/dist/{esm/lib/transformFile.d.mts → cjs/lib/transformFile.d.ts} +0 -0
  31. /package/dist/{esm/lib/url-file-url.d.mts → cjs/lib/url-file-url.d.ts} +0 -0
  32. /package/dist/{esm/loadTsConfig.d.mts → cjs/loadTsConfig.d.ts} +0 -0
  33. /package/dist/{esm/resolveFileSync.d.mts → cjs/resolveFileSync.d.ts} +0 -0
  34. /package/dist/{esm/toPath.d.mts → cjs/toPath.d.ts} +0 -0
  35. /package/dist/{esm/transformDirectory.d.mts → cjs/transformDirectory.d.ts} +0 -0
  36. /package/dist/{esm/transformSync.d.mts → cjs/transformSync.d.ts} +0 -0
  37. /package/dist/{esm/transformTypes.d.mts → cjs/transformTypes.d.ts} +0 -0
  38. /package/dist/{esm/types.d.mts → cjs/types.d.ts} +0 -0
  39. /package/dist/{esm/workers/transformDirectory.d.mts → cjs/workers/transformDirectory.d.ts} +0 -0
  40. /package/dist/{esm/workers/transformSync.d.mts → cjs/workers/transformSync.d.ts} +0 -0
  41. /package/dist/{esm/workers/transformTypes.d.mts → cjs/workers/transformTypes.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator from 'fs-iterator';\nimport Queue from 'queue-cb';\n\nimport { extensions, typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from '../lib/transformFile.js';\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry) => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n const ext = path.extname(entry.basename);\n if (ext && extensions.indexOf(ext) < 0) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n const results = [];\n options = { ...options, tsconfig, src, dest };\n\n const queue = new Queue();\n entries.forEach((entry) => {\n queue.defer((cb) =>\n transformFile(entry, dest, type, options, (err, outPath) => {\n if (err) return cb(err);\n results.push(path.normalize(outPath));\n if (options.sourceMaps) results.push(`${path.normalize(outPath)}.map`);\n cb();\n })\n );\n });\n queue.await((err) => (err ? callback(err) : callback(null, results)));\n }\n );\n}\n"],"names":["transformDirectoryWorker","src","dest","type","options","callback","tsconfig","matcher","createMatcher","entries","iterator","Iterator","forEach","entry","stats","isFile","basename","typeFileRegEx","test","fullPath","ext","path","extname","extensions","indexOf","push","err","results","queue","Queue","defer","cb","transformFile","outPath","normalize","sourceMaps","await"],"mappings":";;;;+BAQA;;;eAAwBA;;;2DARP;iEACI;8DACH;yBAEwB;oEAChB;oEACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEX,SAASA,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,UAAUC,IAAAA,sBAAa,EAACF;IAE9B,IAAMG,UAAU,EAAE;IAClB,IAAMC,WAAW,IAAIC,mBAAQ,CAACV;IAC9BS,SAASE,OAAO,CACd,SAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIC,wBAAa,CAACC,IAAI,CAACL,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACT,QAAQM,MAAMM,QAAQ,GAAG;QAC9B,IAAMC,MAAMC,aAAI,CAACC,OAAO,CAACT,MAAMG,QAAQ;QACvC,IAAII,OAAOG,qBAAU,CAACC,OAAO,CAACJ,OAAO,GAAG;QACxCX,QAAQgB,IAAI,CAACZ;IACf,GACA,SAACa;QACC,IAAIA,KAAK,OAAOrB,SAASqB;QACzB,IAAMC,UAAU,EAAE;QAClBvB,UAAU,wCAAKA;YAASE,UAAAA;YAAUL,KAAAA;YAAKC,MAAAA;;QAEvC,IAAM0B,QAAQ,IAAIC,gBAAK;QACvBpB,QAAQG,OAAO,CAAC,SAACC;YACfe,MAAME,KAAK,CAAC,SAACC;uBACXC,IAAAA,sBAAa,EAACnB,OAAOX,MAAMC,MAAMC,SAAS,SAACsB,KAAKO;oBAC9C,IAAIP,KAAK,OAAOK,GAAGL;oBACnBC,QAAQF,IAAI,CAACJ,aAAI,CAACa,SAAS,CAACD;oBAC5B,IAAI7B,QAAQ+B,UAAU,EAAER,QAAQF,IAAI,CAAC,AAAC,GAA0B,OAAxBJ,aAAI,CAACa,SAAS,CAACD,UAAS;oBAChEF;gBACF;;QAEJ;QACAH,MAAMQ,KAAK,CAAC,SAACV;mBAASA,MAAMrB,SAASqB,OAAOrB,SAAS,MAAMsB;;IAC7D;AAEJ"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator, { type Entry } from 'fs-iterator';\nimport Queue from 'queue-cb';\n\nimport { extensions, typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from '../lib/transformFile.js';\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry: Entry): undefined => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n const ext = path.extname(entry.basename);\n if (ext && extensions.indexOf(ext) < 0) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n const results = [];\n options = { ...options, tsconfig, src, dest };\n\n const queue = new Queue();\n entries.forEach((entry: Entry) => {\n queue.defer((cb) =>\n transformFile(entry, dest, type, options, (err, outPath) => {\n if (err) return cb(err);\n results.push(path.normalize(outPath));\n if (options.sourceMaps) results.push(`${path.normalize(outPath)}.map`);\n cb();\n })\n );\n });\n queue.await((err) => (err ? callback(err) : callback(null, results)));\n }\n );\n}\n"],"names":["transformDirectoryWorker","src","dest","type","options","callback","tsconfig","matcher","createMatcher","entries","iterator","Iterator","forEach","entry","stats","isFile","basename","typeFileRegEx","test","fullPath","ext","path","extname","extensions","indexOf","push","err","results","queue","Queue","defer","cb","transformFile","outPath","normalize","sourceMaps","await"],"mappings":";;;;+BAQA;;;eAAwBA;;;2DARP;iEACoB;8DACnB;yBAEwB;oEAChB;oEACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEX,SAASA,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,UAAUC,IAAAA,sBAAa,EAACF;IAE9B,IAAMG,UAAU,EAAE;IAClB,IAAMC,WAAW,IAAIC,mBAAQ,CAACV;IAC9BS,SAASE,OAAO,CACd,SAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIC,wBAAa,CAACC,IAAI,CAACL,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACT,QAAQM,MAAMM,QAAQ,GAAG;QAC9B,IAAMC,MAAMC,aAAI,CAACC,OAAO,CAACT,MAAMG,QAAQ;QACvC,IAAII,OAAOG,qBAAU,CAACC,OAAO,CAACJ,OAAO,GAAG;QACxCX,QAAQgB,IAAI,CAACZ;IACf,GACA,SAACa;QACC,IAAIA,KAAK,OAAOrB,SAASqB;QACzB,IAAMC,UAAU,EAAE;QAClBvB,UAAU,wCAAKA;YAASE,UAAAA;YAAUL,KAAAA;YAAKC,MAAAA;;QAEvC,IAAM0B,QAAQ,IAAIC,gBAAK;QACvBpB,QAAQG,OAAO,CAAC,SAACC;YACfe,MAAME,KAAK,CAAC,SAACC;uBACXC,IAAAA,sBAAa,EAACnB,OAAOX,MAAMC,MAAMC,SAAS,SAACsB,KAAKO;oBAC9C,IAAIP,KAAK,OAAOK,GAAGL;oBACnBC,QAAQF,IAAI,CAACJ,aAAI,CAACa,SAAS,CAACD;oBAC5B,IAAI7B,QAAQ+B,UAAU,EAAER,QAAQF,IAAI,CAAC,AAAC,GAA0B,OAAxBJ,aAAI,CAACa,SAAS,CAACD,UAAS;oBAChEF;gBACF;;QAEJ;QACAH,MAAMQ,KAAK,CAAC,SAACV;mBAASA,MAAMrB,SAASqB,OAAOrB,SAAS,MAAMsB;;IAC7D;AAEJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformTypes.ts"],"sourcesContent":["import Iterator from 'fs-iterator';\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\n\nexport default function transformTypesWorker(src, dest, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n const ts = _require('typescript');\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry) => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n entries.push(entry);\n },\n { concurrency: Infinity },\n (err) => {\n if (err) return callback(err);\n\n const config = {\n fileNames: entries.map((entry) => entry.fullPath),\n options: {\n ...(tsconfig.compilerOptions || {}),\n outDir: dest,\n allowJs: true,\n declaration: true,\n emitDeclarationOnly: true,\n listEmittedFiles: true,\n },\n projectReferences: tsconfig.config.references,\n };\n const { fileNames, options, projectReferences } = config;\n const host = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, ts.sys);\n const programOptions = {\n rootNames: fileNames,\n options,\n projectReferences,\n host,\n configFileParsingDiagnostics: ts.getConfigFileParsingDiagnostics({ fileNames, options }),\n };\n const program = ts.createProgram(programOptions);\n const res = program.emit();\n callback(null, res.emittedFiles);\n }\n );\n}\n"],"names":["transformTypesWorker","_require","require","Module","createRequire","src","dest","options","callback","tsconfig","matcher","createMatcher","ts","entries","iterator","Iterator","forEach","entry","stats","isFile","basename","typeFileRegEx","test","fullPath","push","concurrency","Infinity","err","config","fileNames","map","compilerOptions","outDir","allowJs","declaration","emitDeclarationOnly","listEmittedFiles","projectReferences","references","host","createCompilerHostWorker","undefined","sys","programOptions","rootNames","configFileParsingDiagnostics","getConfigFileParsingDiagnostics","program","createProgram","res","emit","emittedFiles"],"mappings":";;;;+BAQA;;;eAAwBA;;;iEARH;6DAEF;yBAGW;oEACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAH1B,IAAMC,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAK3E,SAASF,qBAAqBK,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,UAAUC,IAAAA,sBAAa,EAACF;IAC9B,IAAMG,KAAKX,SAAS;IAEpB,IAAMY,UAAU,EAAE;IAClB,IAAMC,WAAW,IAAIC,mBAAQ,CAACV;IAC9BS,SAASE,OAAO,CACd,SAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIC,wBAAa,CAACC,IAAI,CAACL,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACV,QAAQO,MAAMM,QAAQ,GAAG;QAC9BV,QAAQW,IAAI,CAACP;IACf,GACA;QAAEQ,aAAaC;IAAS,GACxB,SAACC;QACC,IAAIA,KAAK,OAAOnB,SAASmB;QAEzB,IAAMC,SAAS;YACbC,WAAWhB,QAAQiB,GAAG,CAAC,SAACb;uBAAUA,MAAMM,QAAQ;;YAChDhB,SAAS,wCACHE,SAASsB,eAAe,IAAI,CAAC;gBACjCC,QAAQ1B;gBACR2B,SAAS;gBACTC,aAAa;gBACbC,qBAAqB;gBACrBC,kBAAkB;;YAEpBC,mBAAmB5B,SAASmB,MAAM,CAACU,UAAU;QAC/C;QACA,IAAQT,YAA0CD,OAA1CC,WAAWtB,YAA+BqB,OAA/BrB,SAAS8B,oBAAsBT,OAAtBS;QAC5B,IAAME,OAAO3B,GAAG4B,wBAAwB,CAACjC,WAAS,gBAAgB,GAAGkC,WAAW7B,GAAG8B,GAAG;QACtF,IAAMC,iBAAiB;YACrBC,WAAWf;YACXtB,SAAAA;YACA8B,mBAAAA;YACAE,MAAAA;YACAM,8BAA8BjC,GAAGkC,+BAA+B,CAAC;gBAAEjB,WAAAA;gBAAWtB,SAAAA;YAAQ;QACxF;QACA,IAAMwC,UAAUnC,GAAGoC,aAAa,CAACL;QACjC,IAAMM,MAAMF,QAAQG,IAAI;QACxB1C,SAAS,MAAMyC,IAAIE,YAAY;IACjC;AAEJ"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformTypes.ts"],"sourcesContent":["import Iterator, { type Entry } from 'fs-iterator';\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\n\nexport default function transformTypesWorker(src, dest, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n const ts = _require('typescript');\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry: Entry): undefined => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n entries.push(entry);\n },\n { concurrency: Infinity },\n (err) => {\n if (err) return callback(err);\n\n const config = {\n fileNames: entries.map((entry) => entry.fullPath),\n options: {\n ...(tsconfig.compilerOptions || {}),\n outDir: dest,\n allowJs: true,\n declaration: true,\n emitDeclarationOnly: true,\n listEmittedFiles: true,\n },\n projectReferences: tsconfig.config.references,\n };\n const { fileNames, options, projectReferences } = config;\n const host = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, ts.sys);\n const programOptions = {\n rootNames: fileNames,\n options,\n projectReferences,\n host,\n configFileParsingDiagnostics: ts.getConfigFileParsingDiagnostics({ fileNames, options }),\n };\n const program = ts.createProgram(programOptions);\n const res = program.emit();\n callback(null, res.emittedFiles);\n }\n );\n}\n"],"names":["transformTypesWorker","_require","require","Module","createRequire","src","dest","options","callback","tsconfig","matcher","createMatcher","ts","entries","iterator","Iterator","forEach","entry","stats","isFile","basename","typeFileRegEx","test","fullPath","push","concurrency","Infinity","err","config","fileNames","map","compilerOptions","outDir","allowJs","declaration","emitDeclarationOnly","listEmittedFiles","projectReferences","references","host","createCompilerHostWorker","undefined","sys","programOptions","rootNames","configFileParsingDiagnostics","getConfigFileParsingDiagnostics","program","createProgram","res","emit","emittedFiles"],"mappings":";;;;+BAQA;;;eAAwBA;;;iEARa;6DAElB;yBAGW;oEACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAH1B,IAAMC,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAK3E,SAASF,qBAAqBK,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,UAAUC,IAAAA,sBAAa,EAACF;IAC9B,IAAMG,KAAKX,SAAS;IAEpB,IAAMY,UAAU,EAAE;IAClB,IAAMC,WAAW,IAAIC,mBAAQ,CAACV;IAC9BS,SAASE,OAAO,CACd,SAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIC,wBAAa,CAACC,IAAI,CAACL,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACV,QAAQO,MAAMM,QAAQ,GAAG;QAC9BV,QAAQW,IAAI,CAACP;IACf,GACA;QAAEQ,aAAaC;IAAS,GACxB,SAACC;QACC,IAAIA,KAAK,OAAOnB,SAASmB;QAEzB,IAAMC,SAAS;YACbC,WAAWhB,QAAQiB,GAAG,CAAC,SAACb;uBAAUA,MAAMM,QAAQ;;YAChDhB,SAAS,wCACHE,SAASsB,eAAe,IAAI,CAAC;gBACjCC,QAAQ1B;gBACR2B,SAAS;gBACTC,aAAa;gBACbC,qBAAqB;gBACrBC,kBAAkB;;YAEpBC,mBAAmB5B,SAASmB,MAAM,CAACU,UAAU;QAC/C;QACA,IAAQT,YAA0CD,OAA1CC,WAAWtB,YAA+BqB,OAA/BrB,SAAS8B,oBAAsBT,OAAtBS;QAC5B,IAAME,OAAO3B,GAAG4B,wBAAwB,CAACjC,WAAS,gBAAgB,GAAGkC,WAAW7B,GAAG8B,GAAG;QACtF,IAAMC,iBAAiB;YACrBC,WAAWf;YACXtB,SAAAA;YACA8B,mBAAAA;YACAE,MAAAA;YACAM,8BAA8BjC,GAAGkC,+BAA+B,CAAC;gBAAEjB,WAAAA;gBAAWtB,SAAAA;YAAQ;QACxF;QACA,IAAMwC,UAAUnC,GAAGoC,aAAa,CAACL;QACjC,IAAMM,MAAMF,QAAQG,IAAI;QACxB1C,SAAS,MAAMyC,IAAIE,YAAY;IACjC;AAEJ"}
@@ -0,0 +1,7 @@
1
+ export declare const moduleRegEx: RegExp;
2
+ export declare const typeFileRegEx: RegExp;
3
+ export declare const moduleDependencyRegEx = "\\s*['\"`]([^'\"`]+)['\"`]\\s*";
4
+ export declare const moduleNameRegEx = "\\s*(?:[\\w${},\\s*]+)\\s*";
5
+ export declare const requireRegEx: RegExp;
6
+ export declare const importRegEx: RegExp;
7
+ export declare const extensions: string[];
@@ -0,0 +1,3 @@
1
+ import type { TsConfigResult } from 'get-tsconfig-compat';
2
+ import type { Matcher } from './types.js';
3
+ export default function createMatcher(tsConfig: TsConfigResult): Matcher;
@@ -0,0 +1,8 @@
1
+ export type * from './types.js';
2
+ export { default as createMatcher } from './createMatcher.js';
3
+ export * as constants from './constants.js';
4
+ export { default as resolveFileSync } from './resolveFileSync.js';
5
+ export { default as toPath } from './toPath.js';
6
+ export { default as transformDirectory } from './transformDirectory.js';
7
+ export { default as transformSync } from './transformSync.js';
8
+ export { default as transformTypes } from './transformTypes.js';
@@ -0,0 +1,2 @@
1
+ export declare const interop = "/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }";
2
+ export default function patchCJS(entry: any, output: any, _options: any): any;
@@ -0,0 +1 @@
1
+ export default function patchESM(entry: any, _output: any, _options: any): any;
@@ -0,0 +1,2 @@
1
+ import type { TsConfigResult } from 'get-tsconfig-compat';
2
+ export default function swcPrepareOptions(tsconfig: TsConfigResult): any;
@@ -0,0 +1 @@
1
+ export default function transformFile(entry: any, dest: any, type: any, options: any, callback: any): void;
@@ -0,0 +1,3 @@
1
+ import URL from 'core-js-pure/actual/url/index.js';
2
+ export declare function fileURLToPath(url: string | URL): string;
3
+ export declare function pathToFileURL(pathname: string): URL;
@@ -0,0 +1,3 @@
1
+ import * as getTS from 'get-tsconfig-compat';
2
+ import type { ConfigOptions } from './types.js';
3
+ export default function loadTsConfig(options: ConfigOptions, name: string): getTS.TsConfigResult;
@@ -0,0 +1,2 @@
1
+ import type { Context } from './types.js';
2
+ export default function resolveFileSync(specifier: string, context?: Context): any;
@@ -0,0 +1,2 @@
1
+ import type { Context } from './types.js';
2
+ export default function toPath(specifier: string, context?: Context): any;
@@ -0,0 +1,10 @@
1
+ import type { ConfigOptions, TransformDirectoryCallback } from './types';
2
+ /**
3
+ * @param {string} src The source directory to traverse.
4
+ * @param {string} dest The output directory to write files to.
5
+ * @param {string} type The type of transform ('esm' or 'cjs').
6
+ * @param {{sourceMaps: boolean}} options Options to pass to swc.
7
+ * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.
8
+ * @returns {void | Promise<any>} Optional promise if callback not provided.
9
+ */
10
+ export default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]>;
@@ -0,0 +1,9 @@
1
+ import type { Output } from '@swc/core';
2
+ import type { TsConfigResult } from 'get-tsconfig-compat';
3
+ /**
4
+ * @param {string} contents The file contents.
5
+ * @param {string} fileName The filename.
6
+ * @param {TsConfigResult} tsconfig The configuration.
7
+ * @returns {{ code: string, map?: string }} Returns object with the transformed code and source map if option sourceMaps was provided.
8
+ */
9
+ export default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output;
@@ -0,0 +1,9 @@
1
+ import type { ConfigOptions, TransformTypesCallback } from './types';
2
+ /**
3
+ * @param {string} src The source directory to traverse.
4
+ * @param {string} dest The output directory to write files to.
5
+ * @param {{tsconfig: TsConfigResult}} options Options.
6
+ * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.
7
+ * @returns {void | Promise<any>} Optional promise if callback not provided.
8
+ */
9
+ export default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]>;
@@ -0,0 +1,13 @@
1
+ export interface Context {
2
+ parentURL?: string;
3
+ parentPath?: string;
4
+ }
5
+ import type { TsConfigResult } from 'get-tsconfig-compat';
6
+ export interface ConfigOptions {
7
+ tsconfig?: TsConfigResult;
8
+ cwd?: string;
9
+ }
10
+ export type TransformDirectoryCallback = (err?: Error, filePaths?: string[]) => void;
11
+ export type TransformFileCallback = (err?: Error, destFilePath?: string) => void;
12
+ export type TransformTypesCallback = (err?: Error, filePaths?: string[]) => void;
13
+ export type Matcher = (filePath: string) => boolean;
@@ -0,0 +1 @@
1
+ export default function transformDirectoryWorker(src: any, dest: any, type: any, options: any, callback: any): void;
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator from 'fs-iterator';\nimport Queue from 'queue-cb';\n\nimport { extensions, typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from '../lib/transformFile.js';\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry) => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n const ext = path.extname(entry.basename);\n if (ext && extensions.indexOf(ext) < 0) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n const results = [];\n options = { ...options, tsconfig, src, dest };\n\n const queue = new Queue();\n entries.forEach((entry) => {\n queue.defer((cb) =>\n transformFile(entry, dest, type, options, (err, outPath) => {\n if (err) return cb(err);\n results.push(path.normalize(outPath));\n if (options.sourceMaps) results.push(`${path.normalize(outPath)}.map`);\n cb();\n })\n );\n });\n queue.await((err) => (err ? callback(err) : callback(null, results)));\n }\n );\n}\n"],"names":["path","Iterator","Queue","extensions","typeFileRegEx","createMatcher","transformFile","transformDirectoryWorker","src","dest","type","options","callback","tsconfig","matcher","entries","iterator","forEach","entry","stats","isFile","basename","test","fullPath","ext","extname","indexOf","push","err","results","queue","defer","cb","outPath","normalize","sourceMaps","await"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,cAAc,cAAc;AACnC,OAAOC,WAAW,WAAW;AAE7B,SAASC,UAAU,EAAEC,aAAa,QAAQ,kBAAkB;AAC5D,OAAOC,mBAAmB,sBAAsB;AAChD,OAAOC,mBAAmB,0BAA0B;AAEpD,eAAe,SAASC,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,UAAUT,cAAcQ;IAE9B,MAAME,UAAU,EAAE;IAClB,MAAMC,WAAW,IAAIf,SAASO;IAC9BQ,SAASC,OAAO,CACd,CAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIjB,cAAckB,IAAI,CAACJ,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACP,QAAQI,MAAMK,QAAQ,GAAG;QAC9B,MAAMC,MAAMxB,KAAKyB,OAAO,CAACP,MAAMG,QAAQ;QACvC,IAAIG,OAAOrB,WAAWuB,OAAO,CAACF,OAAO,GAAG;QACxCT,QAAQY,IAAI,CAACT;IACf,GACA,CAACU;QACC,IAAIA,KAAK,OAAOhB,SAASgB;QACzB,MAAMC,UAAU,EAAE;QAClBlB,UAAU;YAAE,GAAGA,OAAO;YAAEE;YAAUL;YAAKC;QAAK;QAE5C,MAAMqB,QAAQ,IAAI5B;QAClBa,QAAQE,OAAO,CAAC,CAACC;YACfY,MAAMC,KAAK,CAAC,CAACC,KACX1B,cAAcY,OAAOT,MAAMC,MAAMC,SAAS,CAACiB,KAAKK;oBAC9C,IAAIL,KAAK,OAAOI,GAAGJ;oBACnBC,QAAQF,IAAI,CAAC3B,KAAKkC,SAAS,CAACD;oBAC5B,IAAItB,QAAQwB,UAAU,EAAEN,QAAQF,IAAI,CAAC,GAAG3B,KAAKkC,SAAS,CAACD,SAAS,IAAI,CAAC;oBACrED;gBACF;QAEJ;QACAF,MAAMM,KAAK,CAAC,CAACR,MAASA,MAAMhB,SAASgB,OAAOhB,SAAS,MAAMiB;IAC7D;AAEJ"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator, { type Entry } from 'fs-iterator';\nimport Queue from 'queue-cb';\n\nimport { extensions, typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from '../lib/transformFile.js';\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry: Entry): undefined => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n const ext = path.extname(entry.basename);\n if (ext && extensions.indexOf(ext) < 0) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n const results = [];\n options = { ...options, tsconfig, src, dest };\n\n const queue = new Queue();\n entries.forEach((entry: Entry) => {\n queue.defer((cb) =>\n transformFile(entry, dest, type, options, (err, outPath) => {\n if (err) return cb(err);\n results.push(path.normalize(outPath));\n if (options.sourceMaps) results.push(`${path.normalize(outPath)}.map`);\n cb();\n })\n );\n });\n queue.await((err) => (err ? callback(err) : callback(null, results)));\n }\n );\n}\n"],"names":["path","Iterator","Queue","extensions","typeFileRegEx","createMatcher","transformFile","transformDirectoryWorker","src","dest","type","options","callback","tsconfig","matcher","entries","iterator","forEach","entry","stats","isFile","basename","test","fullPath","ext","extname","indexOf","push","err","results","queue","defer","cb","outPath","normalize","sourceMaps","await"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,cAA8B,cAAc;AACnD,OAAOC,WAAW,WAAW;AAE7B,SAASC,UAAU,EAAEC,aAAa,QAAQ,kBAAkB;AAC5D,OAAOC,mBAAmB,sBAAsB;AAChD,OAAOC,mBAAmB,0BAA0B;AAEpD,eAAe,SAASC,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,UAAUT,cAAcQ;IAE9B,MAAME,UAAU,EAAE;IAClB,MAAMC,WAAW,IAAIf,SAASO;IAC9BQ,SAASC,OAAO,CACd,CAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIjB,cAAckB,IAAI,CAACJ,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACP,QAAQI,MAAMK,QAAQ,GAAG;QAC9B,MAAMC,MAAMxB,KAAKyB,OAAO,CAACP,MAAMG,QAAQ;QACvC,IAAIG,OAAOrB,WAAWuB,OAAO,CAACF,OAAO,GAAG;QACxCT,QAAQY,IAAI,CAACT;IACf,GACA,CAACU;QACC,IAAIA,KAAK,OAAOhB,SAASgB;QACzB,MAAMC,UAAU,EAAE;QAClBlB,UAAU;YAAE,GAAGA,OAAO;YAAEE;YAAUL;YAAKC;QAAK;QAE5C,MAAMqB,QAAQ,IAAI5B;QAClBa,QAAQE,OAAO,CAAC,CAACC;YACfY,MAAMC,KAAK,CAAC,CAACC,KACX1B,cAAcY,OAAOT,MAAMC,MAAMC,SAAS,CAACiB,KAAKK;oBAC9C,IAAIL,KAAK,OAAOI,GAAGJ;oBACnBC,QAAQF,IAAI,CAAC3B,KAAKkC,SAAS,CAACD;oBAC5B,IAAItB,QAAQwB,UAAU,EAAEN,QAAQF,IAAI,CAAC,GAAG3B,KAAKkC,SAAS,CAACD,SAAS,IAAI,CAAC;oBACrED;gBACF;QAEJ;QACAF,MAAMM,KAAK,CAAC,CAACR,MAASA,MAAMhB,SAASgB,OAAOhB,SAAS,MAAMiB;IAC7D;AAEJ"}
@@ -0,0 +1,2 @@
1
+ import type { TsConfigResult } from 'get-tsconfig-compat';
2
+ export default function transformSyncWorker(contents: string, fileName: string, tsconfig: TsConfigResult): any;
@@ -0,0 +1 @@
1
+ export default function transformTypesWorker(src: any, dest: any, options: any, callback: any): void;
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformTypes.ts"],"sourcesContent":["import Iterator from 'fs-iterator';\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\n\nexport default function transformTypesWorker(src, dest, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n const ts = _require('typescript');\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry) => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n entries.push(entry);\n },\n { concurrency: Infinity },\n (err) => {\n if (err) return callback(err);\n\n const config = {\n fileNames: entries.map((entry) => entry.fullPath),\n options: {\n ...(tsconfig.compilerOptions || {}),\n outDir: dest,\n allowJs: true,\n declaration: true,\n emitDeclarationOnly: true,\n listEmittedFiles: true,\n },\n projectReferences: tsconfig.config.references,\n };\n const { fileNames, options, projectReferences } = config;\n const host = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, ts.sys);\n const programOptions = {\n rootNames: fileNames,\n options,\n projectReferences,\n host,\n configFileParsingDiagnostics: ts.getConfigFileParsingDiagnostics({ fileNames, options }),\n };\n const program = ts.createProgram(programOptions);\n const res = program.emit();\n callback(null, res.emittedFiles);\n }\n );\n}\n"],"names":["Iterator","Module","_require","require","createRequire","url","typeFileRegEx","createMatcher","transformTypesWorker","src","dest","options","callback","tsconfig","matcher","ts","entries","iterator","forEach","entry","stats","isFile","basename","test","fullPath","push","concurrency","Infinity","err","config","fileNames","map","compilerOptions","outDir","allowJs","declaration","emitDeclarationOnly","listEmittedFiles","projectReferences","references","host","createCompilerHostWorker","undefined","sys","programOptions","rootNames","configFileParsingDiagnostics","getConfigFileParsingDiagnostics","program","createProgram","res","emit","emittedFiles"],"mappings":"AAAA,OAAOA,cAAc,cAAc;AAEnC,OAAOC,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYC,GAAG,IAAIF;AAE1F,SAASG,aAAa,QAAQ,kBAAkB;AAChD,OAAOC,mBAAmB,sBAAsB;AAEhD,eAAe,SAASC,qBAAqBC,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,UAAUP,cAAcM;IAC9B,MAAME,KAAKb,SAAS;IAEpB,MAAMc,UAAU,EAAE;IAClB,MAAMC,WAAW,IAAIjB,SAASS;IAC9BQ,SAASC,OAAO,CACd,CAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIhB,cAAciB,IAAI,CAACJ,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACR,QAAQK,MAAMK,QAAQ,GAAG;QAC9BR,QAAQS,IAAI,CAACN;IACf,GACA;QAAEO,aAAaC;IAAS,GACxB,CAACC;QACC,IAAIA,KAAK,OAAOhB,SAASgB;QAEzB,MAAMC,SAAS;YACbC,WAAWd,QAAQe,GAAG,CAAC,CAACZ,QAAUA,MAAMK,QAAQ;YAChDb,SAAS;gBACP,GAAIE,SAASmB,eAAe,IAAI,CAAC,CAAC;gBAClCC,QAAQvB;gBACRwB,SAAS;gBACTC,aAAa;gBACbC,qBAAqB;gBACrBC,kBAAkB;YACpB;YACAC,mBAAmBzB,SAASgB,MAAM,CAACU,UAAU;QAC/C;QACA,MAAM,EAAET,SAAS,EAAEnB,OAAO,EAAE2B,iBAAiB,EAAE,GAAGT;QAClD,MAAMW,OAAOzB,GAAG0B,wBAAwB,CAAC9B,SAAS,gBAAgB,GAAG+B,WAAW3B,GAAG4B,GAAG;QACtF,MAAMC,iBAAiB;YACrBC,WAAWf;YACXnB;YACA2B;YACAE;YACAM,8BAA8B/B,GAAGgC,+BAA+B,CAAC;gBAAEjB;gBAAWnB;YAAQ;QACxF;QACA,MAAMqC,UAAUjC,GAAGkC,aAAa,CAACL;QACjC,MAAMM,MAAMF,QAAQG,IAAI;QACxBvC,SAAS,MAAMsC,IAAIE,YAAY;IACjC;AAEJ"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/workers/transformTypes.ts"],"sourcesContent":["import Iterator, { type Entry } from 'fs-iterator';\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\n\nexport default function transformTypesWorker(src, dest, options, callback) {\n const tsconfig = options.tsconfig;\n const matcher = createMatcher(tsconfig);\n const ts = _require('typescript');\n\n const entries = [];\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry: Entry): undefined => {\n if (!entry.stats.isFile()) return;\n if (entry.basename[0] === '.') return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (!matcher(entry.fullPath)) return;\n entries.push(entry);\n },\n { concurrency: Infinity },\n (err) => {\n if (err) return callback(err);\n\n const config = {\n fileNames: entries.map((entry) => entry.fullPath),\n options: {\n ...(tsconfig.compilerOptions || {}),\n outDir: dest,\n allowJs: true,\n declaration: true,\n emitDeclarationOnly: true,\n listEmittedFiles: true,\n },\n projectReferences: tsconfig.config.references,\n };\n const { fileNames, options, projectReferences } = config;\n const host = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, ts.sys);\n const programOptions = {\n rootNames: fileNames,\n options,\n projectReferences,\n host,\n configFileParsingDiagnostics: ts.getConfigFileParsingDiagnostics({ fileNames, options }),\n };\n const program = ts.createProgram(programOptions);\n const res = program.emit();\n callback(null, res.emittedFiles);\n }\n );\n}\n"],"names":["Iterator","Module","_require","require","createRequire","url","typeFileRegEx","createMatcher","transformTypesWorker","src","dest","options","callback","tsconfig","matcher","ts","entries","iterator","forEach","entry","stats","isFile","basename","test","fullPath","push","concurrency","Infinity","err","config","fileNames","map","compilerOptions","outDir","allowJs","declaration","emitDeclarationOnly","listEmittedFiles","projectReferences","references","host","createCompilerHostWorker","undefined","sys","programOptions","rootNames","configFileParsingDiagnostics","getConfigFileParsingDiagnostics","program","createProgram","res","emit","emittedFiles"],"mappings":"AAAA,OAAOA,cAA8B,cAAc;AAEnD,OAAOC,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYC,GAAG,IAAIF;AAE1F,SAASG,aAAa,QAAQ,kBAAkB;AAChD,OAAOC,mBAAmB,sBAAsB;AAEhD,eAAe,SAASC,qBAAqBC,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,UAAUP,cAAcM;IAC9B,MAAME,KAAKb,SAAS;IAEpB,MAAMc,UAAU,EAAE;IAClB,MAAMC,WAAW,IAAIjB,SAASS;IAC9BQ,SAASC,OAAO,CACd,CAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAIF,MAAMG,QAAQ,CAAC,EAAE,KAAK,KAAK;QAC/B,IAAIhB,cAAciB,IAAI,CAACJ,MAAMG,QAAQ,GAAG;QACxC,IAAI,CAACR,QAAQK,MAAMK,QAAQ,GAAG;QAC9BR,QAAQS,IAAI,CAACN;IACf,GACA;QAAEO,aAAaC;IAAS,GACxB,CAACC;QACC,IAAIA,KAAK,OAAOhB,SAASgB;QAEzB,MAAMC,SAAS;YACbC,WAAWd,QAAQe,GAAG,CAAC,CAACZ,QAAUA,MAAMK,QAAQ;YAChDb,SAAS;gBACP,GAAIE,SAASmB,eAAe,IAAI,CAAC,CAAC;gBAClCC,QAAQvB;gBACRwB,SAAS;gBACTC,aAAa;gBACbC,qBAAqB;gBACrBC,kBAAkB;YACpB;YACAC,mBAAmBzB,SAASgB,MAAM,CAACU,UAAU;QAC/C;QACA,MAAM,EAAET,SAAS,EAAEnB,OAAO,EAAE2B,iBAAiB,EAAE,GAAGT;QAClD,MAAMW,OAAOzB,GAAG0B,wBAAwB,CAAC9B,SAAS,gBAAgB,GAAG+B,WAAW3B,GAAG4B,GAAG;QACtF,MAAMC,iBAAiB;YACrBC,WAAWf;YACXnB;YACA2B;YACAE;YACAM,8BAA8B/B,GAAGgC,+BAA+B,CAAC;gBAAEjB;gBAAWnB;YAAQ;QACxF;QACA,MAAMqC,UAAUjC,GAAGkC,aAAa,CAACL;QACjC,MAAMM,MAAMF,QAAQG,IAAI;QACxBvC,SAAS,MAAMsC,IAAIE,YAAY;IACjC;AAEJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-swc-transform",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Typescript transformers for swc. Supports Node >= 0.8",
5
5
  "keywords": [
6
6
  "matcher",
@@ -46,16 +46,16 @@
46
46
  "@swc/core": "*",
47
47
  "core-js-pure": "*",
48
48
  "exit": "^0.1.2",
49
- "fs-iterator": "^5.2.27",
49
+ "fs-iterator": "^5.3.7",
50
50
  "get-tsconfig-compat": "^2.0.3",
51
51
  "install-optional": "^0.1.54",
52
52
  "is-absolute": "^1.0.0",
53
53
  "lodash.find": "^4.6.0",
54
54
  "minimatch": "^3.1.2",
55
55
  "mkdirp-classic": "^0.5.3",
56
- "node-version-call": "^1.6.55",
56
+ "node-version-call": "^1.7.0",
57
57
  "path-posix": "^1.0.0",
58
- "queue-cb": "^1.4.17",
58
+ "queue-cb": "^1.5.0",
59
59
  "resolve": "^1.22.10",
60
60
  "rimraf2": "^2.8.2",
61
61
  "ts-node": "*",
File without changes
File without changes
File without changes