ts-swc-transform 2.0.7 → 2.0.9

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.
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- extensions: function() {
12
+ get extensions () {
13
13
  return extensions;
14
14
  },
15
- importRegEx: function() {
15
+ get importRegEx () {
16
16
  return importRegEx;
17
17
  },
18
- moduleDependencyRegEx: function() {
18
+ get moduleDependencyRegEx () {
19
19
  return moduleDependencyRegEx;
20
20
  },
21
- moduleNameRegEx: function() {
21
+ get moduleNameRegEx () {
22
22
  return moduleNameRegEx;
23
23
  },
24
- moduleRegEx: function() {
24
+ get moduleRegEx () {
25
25
  return moduleRegEx;
26
26
  },
27
- requireRegEx: function() {
27
+ get requireRegEx () {
28
28
  return requireRegEx;
29
29
  },
30
- typeFileRegEx: function() {
30
+ get typeFileRegEx () {
31
31
  return typeFileRegEx;
32
32
  }
33
33
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/constants.ts"],"sourcesContent":["export const moduleRegEx = /^[^.\\/]|^\\.[^.\\/]|^\\.\\.[^\\/]/;\nexport const typeFileRegEx = /^[^.]+\\.d\\.[cm]?ts$/;\n\nexport const moduleDependencyRegEx = '\\\\s*[\\'\"`]([^\\'\"`]+)[\\'\"`]\\\\s*';\nexport const moduleNameRegEx = '\\\\s*(?:[\\\\w${},\\\\s*]+)\\\\s*';\nexport const requireRegEx = new RegExp(`(?:(?:var|const|let)${moduleNameRegEx}=\\\\s*)?require\\\\(${moduleDependencyRegEx}\\\\)?`, 'g');\nexport const importRegEx = new RegExp(`${requireRegEx}|import(?:${moduleNameRegEx}from\\\\s*)?${moduleDependencyRegEx};?|export(?:${moduleNameRegEx}from\\\\s*)?${moduleDependencyRegEx}?`, 'g');\nexport const extensions = ['.js', '.jsx', '.cjs', '.mjs', '.ts', '.tsx', '.cts', '.mts', '.es6', '.es'];\n"],"names":["extensions","importRegEx","moduleDependencyRegEx","moduleNameRegEx","moduleRegEx","requireRegEx","typeFileRegEx","RegExp"],"mappings":";;;;;;;;;;;IAOaA,UAAU;eAAVA;;IADAC,WAAW;eAAXA;;IAHAC,qBAAqB;eAArBA;;IACAC,eAAe;eAAfA;;IAJAC,WAAW;eAAXA;;IAKAC,YAAY;eAAZA;;IAJAC,aAAa;eAAbA;;;AADN,IAAMF,cAAc;AACpB,IAAME,gBAAgB;AAEtB,IAAMJ,wBAAwB;AAC9B,IAAMC,kBAAkB;AACxB,IAAME,eAAe,IAAIE,OAAO,AAAC,uBAAyDL,OAAnCC,iBAAgB,qBAAyC,OAAtBD,uBAAsB,SAAO;AACvH,IAAMD,cAAc,IAAIM,OAAO,AAAC,GAA2BJ,OAAzBE,cAAa,cAAwCH,OAA5BC,iBAAgB,cAAgDA,OAApCD,uBAAsB,gBAA0CA,OAA5BC,iBAAgB,cAAkC,OAAtBD,uBAAsB,MAAI;AACjL,IAAMF,aAAa;IAAC;IAAO;IAAQ;IAAQ;IAAQ;IAAO;IAAQ;IAAQ;IAAQ;IAAQ;CAAM"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/constants.ts"],"sourcesContent":["export const moduleRegEx = /^[^.\\/]|^\\.[^.\\/]|^\\.\\.[^\\/]/;\nexport const typeFileRegEx = /^[^.]+\\.d\\.[cm]?ts$/;\n\nexport const moduleDependencyRegEx = '\\\\s*[\\'\"`]([^\\'\"`]+)[\\'\"`]\\\\s*';\nexport const moduleNameRegEx = '\\\\s*(?:[\\\\w${},\\\\s*]+)\\\\s*';\nexport const requireRegEx = new RegExp(`(?:(?:var|const|let)${moduleNameRegEx}=\\\\s*)?require\\\\(${moduleDependencyRegEx}\\\\)?`, 'g');\nexport const importRegEx = new RegExp(`${requireRegEx}|import(?:${moduleNameRegEx}from\\\\s*)?${moduleDependencyRegEx};?|export(?:${moduleNameRegEx}from\\\\s*)?${moduleDependencyRegEx}?`, 'g');\nexport const extensions = ['.js', '.jsx', '.cjs', '.mjs', '.ts', '.tsx', '.cts', '.mts', '.es6', '.es'];\n"],"names":["extensions","importRegEx","moduleDependencyRegEx","moduleNameRegEx","moduleRegEx","requireRegEx","typeFileRegEx","RegExp"],"mappings":";;;;;;;;;;;QAOaA;eAAAA;;QADAC;eAAAA;;QAHAC;eAAAA;;QACAC;eAAAA;;QAJAC;eAAAA;;QAKAC;eAAAA;;QAJAC;eAAAA;;;AADN,IAAMF,cAAc;AACpB,IAAME,gBAAgB;AAEtB,IAAMJ,wBAAwB;AAC9B,IAAMC,kBAAkB;AACxB,IAAME,eAAe,IAAIE,OAAO,AAAC,uBAAyDL,OAAnCC,iBAAgB,qBAAyC,OAAtBD,uBAAsB,SAAO;AACvH,IAAMD,cAAc,IAAIM,OAAO,AAAC,GAA2BJ,OAAzBE,cAAa,cAAwCH,OAA5BC,iBAAgB,cAAgDA,OAApCD,uBAAsB,gBAA0CA,OAA5BC,iBAAgB,cAAkC,OAAtBD,uBAAsB,MAAI;AACjL,IAAMF,aAAa;IAAC;IAAO;IAAQ;IAAQ;IAAQ;IAAO;IAAQ;IAAQ;IAAQ;IAAQ;CAAM"}
package/dist/cjs/index.js CHANGED
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- constants: function() {
12
+ get constants () {
13
13
  return _constants;
14
14
  },
15
- createMatcher: function() {
15
+ get createMatcher () {
16
16
  return _createMatcher.default;
17
17
  },
18
- resolveFileSync: function() {
18
+ get resolveFileSync () {
19
19
  return _resolveFileSync.default;
20
20
  },
21
- toPath: function() {
21
+ get toPath () {
22
22
  return _toPath.default;
23
23
  },
24
- transformDirectory: function() {
24
+ get transformDirectory () {
25
25
  return _transformDirectory.default;
26
26
  },
27
- transformSync: function() {
27
+ get transformSync () {
28
28
  return _transformSync.default;
29
29
  },
30
- transformTypes: function() {
30
+ get transformTypes () {
31
31
  return _transformTypes.default;
32
32
  }
33
33
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/index.ts"],"sourcesContent":["export type * from './types.js';\nexport { default as createMatcher } from './createMatcher.js';\nexport * as constants from './constants.js';\nexport { default as resolveFileSync } from './resolveFileSync.js';\nexport { default as toPath } from './toPath.js';\n\nexport { default as transformDirectory } from './transformDirectory.js';\nexport { default as transformSync } from './transformSync.js';\nexport { default as transformTypes } from './transformTypes.js';\n"],"names":["constants","createMatcher","resolveFileSync","toPath","transformDirectory","transformSync","transformTypes"],"mappings":";;;;;;;;;;;IAEYA,SAAS;;;IADDC,aAAa;eAAbA,sBAAa;;IAEbC,eAAe;eAAfA,wBAAe;;IACfC,MAAM;eAANA,eAAM;;IAENC,kBAAkB;eAAlBA,2BAAkB;;IAClBC,aAAa;eAAbA,sBAAa;;IACbC,cAAc;eAAdA,uBAAc;;;oEAPO;iEACd;sEACgB;6DACT;yEAEY;oEACL;qEACC"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/index.ts"],"sourcesContent":["export type * from './types.js';\nexport { default as createMatcher } from './createMatcher.js';\nexport * as constants from './constants.js';\nexport { default as resolveFileSync } from './resolveFileSync.js';\nexport { default as toPath } from './toPath.js';\n\nexport { default as transformDirectory } from './transformDirectory.js';\nexport { default as transformSync } from './transformSync.js';\nexport { default as transformTypes } from './transformTypes.js';\n"],"names":["constants","createMatcher","resolveFileSync","toPath","transformDirectory","transformSync","transformTypes"],"mappings":";;;;;;;;;;;QAEYA;;;QADQC;eAAAA,sBAAa;;QAEbC;eAAAA,wBAAe;;QACfC;eAAAA,eAAM;;QAENC;eAAAA,2BAAkB;;QAClBC;eAAAA,sBAAa;;QACbC;eAAAA,uBAAc;;;oEAPO;iEACd;sEACgB;6DACT;yEAEY;oEACL;qEACC"}
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- default: function() {
12
+ get default () {
13
13
  return patchCJS;
14
14
  },
15
- interop: function() {
15
+ get interop () {
16
16
  return interop;
17
17
  }
18
18
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/lib/patchCJS.ts"],"sourcesContent":["import path from 'path';\n\n// https://github.com/vercel/next.js/blob/20b63e13ab2631d6043277895d373aa31a1b327c/packages/next/taskfile-swc.js#L118-L125\nexport 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; }\";\n\nconst EXTENSIONS = ['.ts', '.tsx'];\n\nexport default function patchCJS(entry, output, _options) {\n output.code += interop;\n const ext = path.extname(entry.basename);\n return EXTENSIONS.indexOf(ext) >= 0 ? '.js' : ext;\n}\n"],"names":["patchCJS","interop","EXTENSIONS","entry","output","_options","code","ext","path","extname","basename","indexOf"],"mappings":";;;;;;;;;;;IAOA,OAIC;eAJuBA;;IAJXC,OAAO;eAAPA;;;2DAHI;;;;;;AAGV,IAAMA,UAAU;AAEvB,IAAMC,aAAa;IAAC;IAAO;CAAO;AAEnB,SAASF,SAASG,KAAK,EAAEC,MAAM,EAAEC,QAAQ;IACtDD,OAAOE,IAAI,IAAIL;IACf,IAAMM,MAAMC,aAAI,CAACC,OAAO,CAACN,MAAMO,QAAQ;IACvC,OAAOR,WAAWS,OAAO,CAACJ,QAAQ,IAAI,QAAQA;AAChD"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/lib/patchCJS.ts"],"sourcesContent":["import path from 'path';\n\n// https://github.com/vercel/next.js/blob/20b63e13ab2631d6043277895d373aa31a1b327c/packages/next/taskfile-swc.js#L118-L125\nexport 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; }\";\n\nconst EXTENSIONS = ['.ts', '.tsx'];\n\nexport default function patchCJS(entry, output, _options) {\n output.code += interop;\n const ext = path.extname(entry.basename);\n return EXTENSIONS.indexOf(ext) >= 0 ? '.js' : ext;\n}\n"],"names":["patchCJS","interop","EXTENSIONS","entry","output","_options","code","ext","path","extname","basename","indexOf"],"mappings":";;;;;;;;;;;QAOA;eAAwBA;;QAJXC;eAAAA;;;2DAHI;;;;;;AAGV,IAAMA,UAAU;AAEvB,IAAMC,aAAa;IAAC;IAAO;CAAO;AAEnB,SAASF,SAASG,KAAK,EAAEC,MAAM,EAAEC,QAAQ;IACtDD,OAAOE,IAAI,IAAIL;IACf,IAAMM,MAAMC,aAAI,CAACC,OAAO,CAACN,MAAMO,QAAQ;IACvC,OAAOR,WAAWS,OAAO,CAACJ,QAAQ,IAAI,QAAQA;AAChD"}
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  function _export(target, all) {
8
8
  for(var name in all)Object.defineProperty(target, name, {
9
9
  enumerable: true,
10
- get: all[name]
10
+ get: Object.getOwnPropertyDescriptor(all, name).get
11
11
  });
12
12
  }
13
13
  _export(exports, {
14
- fileURLToPath: function() {
14
+ get fileURLToPath () {
15
15
  return fileURLToPath;
16
16
  },
17
- pathToFileURL: function() {
17
+ get pathToFileURL () {
18
18
  return pathToFileURL;
19
19
  }
20
20
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/lib/url-file-url.ts"],"sourcesContent":["// Extracted from https://raw.githubusercontent.com/holepunchto/url-file-url/refs/heads/main/index.js\n// Apache 2 License https://github.com/holepunchto/url-file-url/blob/main/LICENSE\n\nimport path from 'path';\nimport replaceAll from 'core-js-pure/actual/string/replace-all.js';\nimport URL from 'core-js-pure/actual/url/index.js';\nconst isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);\n\nexport function fileURLToPath(url: string | URL): string {\n if (typeof url === 'string') {\n url = new URL(url);\n }\n\n if (url.protocol !== 'file:') {\n throw new Error('The URL must use the file: protocol');\n }\n\n if (isWindows) {\n if (/%2f|%5c/i.test(url.pathname)) {\n throw new Error('The file: URL path must not include encoded \\\\ or / characters');\n }\n } else {\n if (url.hostname) {\n throw new Error(\"The file: URL host must be 'localhost' or empty\");\n }\n\n if (/%2f/i.test(url.pathname)) {\n throw new Error('The file: URL path must not include encoded / characters');\n }\n }\n\n const pathname = path.normalize(decodeURIComponent(url.pathname));\n\n if (isWindows) {\n if (url.hostname) return `\\\\\\\\${url.hostname}${pathname}`;\n\n const letter = pathname.charCodeAt(1) | 0x20;\n\n if (letter < 0x61 /* a */ || letter > 0x7a /* z */ || pathname.charCodeAt(2) !== 0x3a /* : */) {\n throw new Error('The file: URL path must be absolute');\n }\n\n return pathname.slice(1);\n }\n\n return pathname;\n}\n\nexport function pathToFileURL(pathname: string): URL {\n let resolved = path.resolve(pathname);\n\n if (pathname[pathname.length - 1] === '/') {\n resolved += '/';\n } else if (isWindows && pathname[pathname.length - 1] === '\\\\') {\n resolved += '\\\\';\n }\n\n resolved = replaceAll(resolved, '%', '%25'); // Must be first\n resolved = replaceAll(resolved, '#', '%23');\n resolved = replaceAll(resolved, '?', '%3f');\n resolved = replaceAll(resolved, '\\n', '%0a');\n resolved = replaceAll(resolved, '\\r', '%0d');\n resolved = replaceAll(resolved, '\\t', '%09');\n\n if (!isWindows) {\n resolved = replaceAll(resolved, '\\\\', '%5c');\n }\n\n return new URL(`file:${resolved}`);\n}\n"],"names":["fileURLToPath","pathToFileURL","isWindows","process","platform","test","env","OSTYPE","url","URL","protocol","Error","pathname","hostname","path","normalize","decodeURIComponent","letter","charCodeAt","slice","resolved","resolve","length","replaceAll"],"mappings":"AAAA,qGAAqG;AACrG,iFAAiF;;;;;;;;;;;;IAOjEA,aAAa;eAAbA;;IAwCAC,aAAa;eAAbA;;;2DA7CC;iEACM;4DACP;;;;;;AAChB,IAAMC,YAAYC,QAAQC,QAAQ,KAAK,WAAW,kBAAkBC,IAAI,CAACF,QAAQG,GAAG,CAACC,MAAM;AAEpF,SAASP,cAAcQ,GAAiB;IAC7C,IAAI,OAAOA,QAAQ,UAAU;QAC3BA,MAAM,IAAIC,cAAG,CAACD;IAChB;IAEA,IAAIA,IAAIE,QAAQ,KAAK,SAAS;QAC5B,MAAM,IAAIC,MAAM;IAClB;IAEA,IAAIT,WAAW;QACb,IAAI,WAAWG,IAAI,CAACG,IAAII,QAAQ,GAAG;YACjC,MAAM,IAAID,MAAM;QAClB;IACF,OAAO;QACL,IAAIH,IAAIK,QAAQ,EAAE;YAChB,MAAM,IAAIF,MAAM;QAClB;QAEA,IAAI,OAAON,IAAI,CAACG,IAAII,QAAQ,GAAG;YAC7B,MAAM,IAAID,MAAM;QAClB;IACF;IAEA,IAAMC,WAAWE,aAAI,CAACC,SAAS,CAACC,mBAAmBR,IAAII,QAAQ;IAE/D,IAAIV,WAAW;QACb,IAAIM,IAAIK,QAAQ,EAAE,OAAO,AAAC,OAAqBD,OAAfJ,IAAIK,QAAQ,EAAY,OAATD;QAE/C,IAAMK,SAASL,SAASM,UAAU,CAAC,KAAK;QAExC,IAAID,SAAS,KAAK,KAAK,OAAMA,SAAS,KAAK,KAAK,OAAML,SAASM,UAAU,CAAC,OAAO,KAAK,KAAK,KAAI;YAC7F,MAAM,IAAIP,MAAM;QAClB;QAEA,OAAOC,SAASO,KAAK,CAAC;IACxB;IAEA,OAAOP;AACT;AAEO,SAASX,cAAcW,QAAgB;IAC5C,IAAIQ,WAAWN,aAAI,CAACO,OAAO,CAACT;IAE5B,IAAIA,QAAQ,CAACA,SAASU,MAAM,GAAG,EAAE,KAAK,KAAK;QACzCF,YAAY;IACd,OAAO,IAAIlB,aAAaU,QAAQ,CAACA,SAASU,MAAM,GAAG,EAAE,KAAK,MAAM;QAC9DF,YAAY;IACd;IAEAA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,KAAK,QAAQ,gBAAgB;IAC7DA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,KAAK;IACrCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,KAAK;IACrCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IACtCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IACtCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IAEtC,IAAI,CAAClB,WAAW;QACdkB,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IACxC;IAEA,OAAO,IAAIX,cAAG,CAAC,AAAC,QAAgB,OAATW;AACzB"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/lib/url-file-url.ts"],"sourcesContent":["// Extracted from https://raw.githubusercontent.com/holepunchto/url-file-url/refs/heads/main/index.js\n// Apache 2 License https://github.com/holepunchto/url-file-url/blob/main/LICENSE\n\nimport path from 'path';\nimport replaceAll from 'core-js-pure/actual/string/replace-all.js';\nimport URL from 'core-js-pure/actual/url/index.js';\nconst isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);\n\nexport function fileURLToPath(url: string | URL): string {\n if (typeof url === 'string') {\n url = new URL(url);\n }\n\n if (url.protocol !== 'file:') {\n throw new Error('The URL must use the file: protocol');\n }\n\n if (isWindows) {\n if (/%2f|%5c/i.test(url.pathname)) {\n throw new Error('The file: URL path must not include encoded \\\\ or / characters');\n }\n } else {\n if (url.hostname) {\n throw new Error(\"The file: URL host must be 'localhost' or empty\");\n }\n\n if (/%2f/i.test(url.pathname)) {\n throw new Error('The file: URL path must not include encoded / characters');\n }\n }\n\n const pathname = path.normalize(decodeURIComponent(url.pathname));\n\n if (isWindows) {\n if (url.hostname) return `\\\\\\\\${url.hostname}${pathname}`;\n\n const letter = pathname.charCodeAt(1) | 0x20;\n\n if (letter < 0x61 /* a */ || letter > 0x7a /* z */ || pathname.charCodeAt(2) !== 0x3a /* : */) {\n throw new Error('The file: URL path must be absolute');\n }\n\n return pathname.slice(1);\n }\n\n return pathname;\n}\n\nexport function pathToFileURL(pathname: string): URL {\n let resolved = path.resolve(pathname);\n\n if (pathname[pathname.length - 1] === '/') {\n resolved += '/';\n } else if (isWindows && pathname[pathname.length - 1] === '\\\\') {\n resolved += '\\\\';\n }\n\n resolved = replaceAll(resolved, '%', '%25'); // Must be first\n resolved = replaceAll(resolved, '#', '%23');\n resolved = replaceAll(resolved, '?', '%3f');\n resolved = replaceAll(resolved, '\\n', '%0a');\n resolved = replaceAll(resolved, '\\r', '%0d');\n resolved = replaceAll(resolved, '\\t', '%09');\n\n if (!isWindows) {\n resolved = replaceAll(resolved, '\\\\', '%5c');\n }\n\n return new URL(`file:${resolved}`);\n}\n"],"names":["fileURLToPath","pathToFileURL","isWindows","process","platform","test","env","OSTYPE","url","URL","protocol","Error","pathname","hostname","path","normalize","decodeURIComponent","letter","charCodeAt","slice","resolved","resolve","length","replaceAll"],"mappings":"AAAA,qGAAqG;AACrG,iFAAiF;;;;;;;;;;;;QAOjEA;eAAAA;;QAwCAC;eAAAA;;;2DA7CC;iEACM;4DACP;;;;;;AAChB,IAAMC,YAAYC,QAAQC,QAAQ,KAAK,WAAW,kBAAkBC,IAAI,CAACF,QAAQG,GAAG,CAACC,MAAM;AAEpF,SAASP,cAAcQ,GAAiB;IAC7C,IAAI,OAAOA,QAAQ,UAAU;QAC3BA,MAAM,IAAIC,cAAG,CAACD;IAChB;IAEA,IAAIA,IAAIE,QAAQ,KAAK,SAAS;QAC5B,MAAM,IAAIC,MAAM;IAClB;IAEA,IAAIT,WAAW;QACb,IAAI,WAAWG,IAAI,CAACG,IAAII,QAAQ,GAAG;YACjC,MAAM,IAAID,MAAM;QAClB;IACF,OAAO;QACL,IAAIH,IAAIK,QAAQ,EAAE;YAChB,MAAM,IAAIF,MAAM;QAClB;QAEA,IAAI,OAAON,IAAI,CAACG,IAAII,QAAQ,GAAG;YAC7B,MAAM,IAAID,MAAM;QAClB;IACF;IAEA,IAAMC,WAAWE,aAAI,CAACC,SAAS,CAACC,mBAAmBR,IAAII,QAAQ;IAE/D,IAAIV,WAAW;QACb,IAAIM,IAAIK,QAAQ,EAAE,OAAO,AAAC,OAAqBD,OAAfJ,IAAIK,QAAQ,EAAY,OAATD;QAE/C,IAAMK,SAASL,SAASM,UAAU,CAAC,KAAK;QAExC,IAAID,SAAS,KAAK,KAAK,OAAMA,SAAS,KAAK,KAAK,OAAML,SAASM,UAAU,CAAC,OAAO,KAAK,KAAK,KAAI;YAC7F,MAAM,IAAIP,MAAM;QAClB;QAEA,OAAOC,SAASO,KAAK,CAAC;IACxB;IAEA,OAAOP;AACT;AAEO,SAASX,cAAcW,QAAgB;IAC5C,IAAIQ,WAAWN,aAAI,CAACO,OAAO,CAACT;IAE5B,IAAIA,QAAQ,CAACA,SAASU,MAAM,GAAG,EAAE,KAAK,KAAK;QACzCF,YAAY;IACd,OAAO,IAAIlB,aAAaU,QAAQ,CAACA,SAASU,MAAM,GAAG,EAAE,KAAK,MAAM;QAC9DF,YAAY;IACd;IAEAA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,KAAK,QAAQ,gBAAgB;IAC7DA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,KAAK;IACrCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,KAAK;IACrCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IACtCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IACtCA,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IAEtC,IAAI,CAAClB,WAAW;QACdkB,WAAWG,IAAAA,mBAAU,EAACH,UAAU,MAAM;IACxC;IAEA,OAAO,IAAIX,cAAG,CAAC,AAAC,QAAgB,OAATW;AACzB"}
@@ -1,10 +1,2 @@
1
1
  import type { ConfigOptions, TransformDirectoryCallback } from './types.js';
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
2
  export default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]>;
@@ -1,10 +1,2 @@
1
1
  import type { ConfigOptions, TransformDirectoryCallback } from './types.js';
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
2
  export default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]>;
@@ -2,14 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, /**
6
- * @param {string} src The source directory to traverse.
7
- * @param {string} dest The output directory to write files to.
8
- * @param {string} type The type of transform ('esm' or 'cjs').
9
- * @param {{sourceMaps: boolean}} options Options to pass to swc.
10
- * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.
11
- * @returns {void | Promise<any>} Optional promise if callback not provided.
12
- */ "default", {
5
+ Object.defineProperty(exports, "default", {
13
6
  enumerable: true,
14
7
  get: function() {
15
8
  return transformDirectory;
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformDirectory.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, type, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, type, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, type, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformDirectoryCallback } from './types.js';\n/**\n * @param {string} src The source directory to traverse.\n * @param {string} dest The output directory to write files to.\n * @param {string} type The type of transform ('esm' or 'cjs').\n * @param {{sourceMaps: boolean}} options Options to pass to swc.\n * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.\n * @returns {void | Promise<any>} Optional promise if callback not provided.\n */\nexport default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');\n if (typeof type !== 'string') throw new Error('transformDirectory: unexpected type');\n\n if (typeof options === 'function') {\n callback = options as TransformDirectoryCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformDirectory');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, type, options, callback) as undefined;\n return new Promise((resolve, reject) => dispatch(version, src, dest, type, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["transformDirectory","major","process","versions","node","split","version","__dirname","path","dirname","__filename","url","fileURLToPath","workerPath","join","_require","require","Module","createRequire","dispatch","src","dest","type","options","callback","callbacks","err","Error","tsconfig","loadTsConfig","cwd","Promise","resolve","reject","result"],"mappings":";;;;+BAsBA;;;;;;;CAOC,GACD;;;eAAwBA;;;2DA9BP;0DACD;mEACS;6DAON;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AALnB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,IAAMM,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,YAAG,CAACC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,aAAaL,aAAI,CAACM,IAAI,CAACP,WAAW,MAAM,OAAO,WAAW;AAGhE,IAAMQ,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAE1F,SAASG,SAASb,OAAO,EAAEc,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,IAAIlB,YAAY,SAAS,OAAOS,SAASF,YAAYO,KAAKC,MAAMC,MAAMC,SAASC;IAC/E,IAAI;QACFA,SAAS,MAAMT,SAAS,qBAAqB;YAAET,SAAAA;YAASmB,WAAW;QAAK,GAAGZ,YAAYO,KAAKC,MAAMC,MAAMC;IAC1G,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAWe,SAAS1B,mBAAmBoB,GAAW,EAAEC,IAAY,EAAEC,IAAY,EAAEC,OAAoD,EAAEC,QAAqC;IAC7K,IAAI;QACF,IAAI,OAAOJ,QAAQ,UAAU,MAAM,IAAIO,MAAM;QAC7C,IAAI,OAAON,SAAS,UAAU,MAAM,IAAIM,MAAM;QAC9C,IAAI,OAAOL,SAAS,UAAU,MAAM,IAAIK,MAAM;QAE9C,IAAI,OAAOJ,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,IAAMK,WAAWC,IAAAA,qBAAY,EAAC;YAAEC,KAAKV;WAAQG,UAAW;QACxDA,UAAU;YAAEK,UAAAA;WAAaL;QAEzB,IAAI,OAAOC,aAAa,YAAY,OAAOL,SAASb,SAASc,KAAKC,MAAMC,MAAMC,SAASC;QACvF,OAAO,IAAIO,QAAQ,SAACC,SAASC;mBAAWd,SAASb,SAASc,KAAKC,MAAMC,MAAMC,SAAS,SAACG,KAAKQ;uBAAYR,MAAMO,OAAOP,OAAOM,QAAQE;;;IACpI,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformDirectory.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, type, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, type, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, type, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformDirectoryCallback } from './types.js';\nexport default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');\n if (typeof type !== 'string') throw new Error('transformDirectory: unexpected type');\n\n if (typeof options === 'function') {\n callback = options as TransformDirectoryCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformDirectory');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, type, options, callback) as undefined;\n return new Promise((resolve, reject) => dispatch(version, src, dest, type, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["transformDirectory","major","process","versions","node","split","version","__dirname","path","dirname","__filename","url","fileURLToPath","workerPath","join","_require","require","Module","createRequire","dispatch","src","dest","type","options","callback","callbacks","err","Error","tsconfig","loadTsConfig","cwd","Promise","resolve","reject","result"],"mappings":";;;;+BAsBA;;;eAAwBA;;;2DAtBP;0DACD;mEACS;6DAON;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AALnB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,IAAMM,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,YAAG,CAACC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,aAAaL,aAAI,CAACM,IAAI,CAACP,WAAW,MAAM,OAAO,WAAW;AAGhE,IAAMQ,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAE1F,SAASG,SAASb,OAAO,EAAEc,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,IAAIlB,YAAY,SAAS,OAAOS,SAASF,YAAYO,KAAKC,MAAMC,MAAMC,SAASC;IAC/E,IAAI;QACFA,SAAS,MAAMT,SAAS,qBAAqB;YAAET,SAAAA;YAASmB,WAAW;QAAK,GAAGZ,YAAYO,KAAKC,MAAMC,MAAMC;IAC1G,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAGe,SAAS1B,mBAAmBoB,GAAW,EAAEC,IAAY,EAAEC,IAAY,EAAEC,OAAoD,EAAEC,QAAqC;IAC7K,IAAI;QACF,IAAI,OAAOJ,QAAQ,UAAU,MAAM,IAAIO,MAAM;QAC7C,IAAI,OAAON,SAAS,UAAU,MAAM,IAAIM,MAAM;QAC9C,IAAI,OAAOL,SAAS,UAAU,MAAM,IAAIK,MAAM;QAE9C,IAAI,OAAOJ,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,IAAMK,WAAWC,IAAAA,qBAAY,EAAC;YAAEC,KAAKV;WAAQG,UAAW;QACxDA,UAAU;YAAEK,UAAAA;WAAaL;QAEzB,IAAI,OAAOC,aAAa,YAAY,OAAOL,SAASb,SAASc,KAAKC,MAAMC,MAAMC,SAASC;QACvF,OAAO,IAAIO,QAAQ,SAACC,SAASC;mBAAWd,SAASb,SAASc,KAAKC,MAAMC,MAAMC,SAAS,SAACG,KAAKQ;uBAAYR,MAAMO,OAAOP,OAAOM,QAAQE;;;IACpI,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
@@ -1,9 +1,3 @@
1
1
  import type { Output } from '@swc/core';
2
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
3
  export default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output;
@@ -1,9 +1,3 @@
1
1
  import type { Output } from '@swc/core';
2
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
3
  export default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output;
@@ -2,12 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, /**
6
- * @param {string} contents The file contents.
7
- * @param {string} fileName The filename.
8
- * @param {TsConfigResult} tsconfig The configuration.
9
- * @returns {{ code: string, map?: string }} Returns object with the transformed code and source map if option sourceMaps was provided.
10
- */ "default", {
5
+ Object.defineProperty(exports, "default", {
11
6
  enumerable: true,
12
7
  get: function() {
13
8
  return transformSync;
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformSync.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport * as getTS from 'get-tsconfig-compat';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformSync.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, contents, fileName, tsconfig) {\n if (version === 'local') return _require(workerPath)(contents, fileName, tsconfig);\n return _require('node-version-call')(version, workerPath, contents, fileName, tsconfig);\n}\n\nimport type { Output } from '@swc/core';\nimport type { TsConfigResult } from 'get-tsconfig-compat';\n/**\n * @param {string} contents The file contents.\n * @param {string} fileName The filename.\n * @param {TsConfigResult} tsconfig The configuration.\n * @returns {{ code: string, map?: string }} Returns object with the transformed code and source map if option sourceMaps was provided.\n */\nexport default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output {\n if (typeof contents !== 'string') throw new Error('transformTypes: unexpected contents');\n if (typeof fileName !== 'string') throw new Error('transformTypes: unexpected fileName');\n if (!tsconfig) tsconfig = getTS.getTsconfig(process.cwd());\n return dispatch(version, contents, fileName, tsconfig);\n}\n"],"names":["transformSync","major","process","versions","node","split","version","__dirname","path","dirname","__filename","url","fileURLToPath","workerPath","join","_require","require","Module","createRequire","dispatch","contents","fileName","tsconfig","Error","getTS","getTsconfig","cwd"],"mappings":";;;;+BAmBA;;;;;CAKC,GACD;;;eAAwBA;;;2DAzBP;0DACD;yEACO;6DAOJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AALnB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,IAAMM,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,YAAG,CAACC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,aAAaL,aAAI,CAACM,IAAI,CAACP,WAAW,MAAM,OAAO,WAAW;AAGhE,IAAMQ,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAE1F,SAASG,SAASb,OAAO,EAAEc,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ;IACrD,IAAIhB,YAAY,SAAS,OAAOS,SAASF,YAAYO,UAAUC,UAAUC;IACzE,OAAOP,SAAS,qBAAqBT,SAASO,YAAYO,UAAUC,UAAUC;AAChF;AAUe,SAAStB,cAAcoB,QAAgB,EAAEC,QAAgB,EAAEC,QAAwB;IAChG,IAAI,OAAOF,aAAa,UAAU,MAAM,IAAIG,MAAM;IAClD,IAAI,OAAOF,aAAa,UAAU,MAAM,IAAIE,MAAM;IAClD,IAAI,CAACD,UAAUA,WAAWE,mBAAMC,WAAW,CAACvB,QAAQwB,GAAG;IACvD,OAAOP,SAASb,SAASc,UAAUC,UAAUC;AAC/C"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformSync.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport * as getTS from 'get-tsconfig-compat';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformSync.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, contents, fileName, tsconfig) {\n if (version === 'local') return _require(workerPath)(contents, fileName, tsconfig);\n return _require('node-version-call')(version, workerPath, contents, fileName, tsconfig);\n}\n\nimport type { Output } from '@swc/core';\nimport type { TsConfigResult } from 'get-tsconfig-compat';\nexport default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output {\n if (typeof contents !== 'string') throw new Error('transformTypes: unexpected contents');\n if (typeof fileName !== 'string') throw new Error('transformTypes: unexpected fileName');\n if (!tsconfig) tsconfig = getTS.getTsconfig(process.cwd());\n return dispatch(version, contents, fileName, tsconfig);\n}\n"],"names":["transformSync","major","process","versions","node","split","version","__dirname","path","dirname","__filename","url","fileURLToPath","workerPath","join","_require","require","Module","createRequire","dispatch","contents","fileName","tsconfig","Error","getTS","getTsconfig","cwd"],"mappings":";;;;+BAmBA;;;eAAwBA;;;2DAnBP;0DACD;yEACO;6DAOJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AALnB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,IAAMM,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,YAAG,CAACC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,aAAaL,aAAI,CAACM,IAAI,CAACP,WAAW,MAAM,OAAO,WAAW;AAGhE,IAAMQ,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAE1F,SAASG,SAASb,OAAO,EAAEc,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ;IACrD,IAAIhB,YAAY,SAAS,OAAOS,SAASF,YAAYO,UAAUC,UAAUC;IACzE,OAAOP,SAAS,qBAAqBT,SAASO,YAAYO,UAAUC,UAAUC;AAChF;AAIe,SAAStB,cAAcoB,QAAgB,EAAEC,QAAgB,EAAEC,QAAwB;IAChG,IAAI,OAAOF,aAAa,UAAU,MAAM,IAAIG,MAAM;IAClD,IAAI,OAAOF,aAAa,UAAU,MAAM,IAAIE,MAAM;IAClD,IAAI,CAACD,UAAUA,WAAWE,mBAAMC,WAAW,CAACvB,QAAQwB,GAAG;IACvD,OAAOP,SAASb,SAASc,UAAUC,UAAUC;AAC/C"}
@@ -1,9 +1,2 @@
1
1
  import type { ConfigOptions, TransformTypesCallback } from './types.js';
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
2
  export default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]>;
@@ -1,9 +1,2 @@
1
1
  import type { ConfigOptions, TransformTypesCallback } from './types.js';
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
2
  export default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]>;
@@ -2,13 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, /**
6
- * @param {string} src The source directory to traverse.
7
- * @param {string} dest The output directory to write files to.
8
- * @param {{tsconfig: TsConfigResult}} options Options.
9
- * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.
10
- * @returns {void | Promise<any>} Optional promise if callback not provided.
11
- */ "default", {
5
+ Object.defineProperty(exports, "default", {
12
6
  enumerable: true,
13
7
  get: function() {
14
8
  return transformTypes;
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformTypes.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformTypes.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformTypesCallback } from './types.js';\n/**\n * @param {string} src The source directory to traverse.\n * @param {string} dest The output directory to write files to.\n * @param {{tsconfig: TsConfigResult}} options Options.\n * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.\n * @returns {void | Promise<any>} Optional promise if callback not provided.\n */\nexport default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformTypes: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformTypes: unexpected destination directory');\n\n if (typeof options === 'function') {\n callback = options as TransformTypesCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformTypes');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, options, callback);\n return new Promise((resolve, reject) => dispatch(version, src, dest, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["transformTypes","major","process","versions","node","split","version","__dirname","path","dirname","__filename","url","fileURLToPath","workerPath","join","_require","require","Module","createRequire","dispatch","src","dest","options","callback","callbacks","err","Error","tsconfig","loadTsConfig","cwd","Promise","resolve","reject","result"],"mappings":";;;;+BAsBA;;;;;;CAMC,GACD;;;eAAwBA;;;2DA7BP;0DACD;mEACS;6DAON;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AALnB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,IAAMM,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,YAAG,CAACC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,aAAaL,aAAI,CAACM,IAAI,CAACP,WAAW,MAAM,OAAO,WAAW;AAGhE,IAAMQ,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAE1F,SAASG,SAASb,OAAO,EAAEc,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACrD,IAAIjB,YAAY,SAAS,OAAOS,SAASF,YAAYO,KAAKC,MAAMC,SAASC;IACzE,IAAI;QACFA,SAAS,MAAMR,SAAS,qBAAqB;YAAET,SAAAA;YAASkB,WAAW;QAAK,GAAGX,YAAYO,KAAKC,MAAMC;IACpG,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAUe,SAASzB,eAAeoB,GAAW,EAAEC,IAAY,EAAEC,OAAgD,EAAEC,QAAiC;IACnJ,IAAI;QACF,IAAI,OAAOH,QAAQ,UAAU,MAAM,IAAIM,MAAM;QAC7C,IAAI,OAAOL,SAAS,UAAU,MAAM,IAAIK,MAAM;QAE9C,IAAI,OAAOJ,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,IAAMK,WAAWC,IAAAA,qBAAY,EAAC;YAAEC,KAAKT;WAAQE,UAAW;QACxDA,UAAU;YAAEK,UAAAA;WAAaL;QAEzB,IAAI,OAAOC,aAAa,YAAY,OAAOJ,SAASb,SAASc,KAAKC,MAAMC,SAASC;QACjF,OAAO,IAAIO,QAAQ,SAACC,SAASC;mBAAWb,SAASb,SAASc,KAAKC,MAAMC,SAAS,SAACG,KAAKQ;uBAAYR,MAAMO,OAAOP,OAAOM,QAAQE;;;IAC9H,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformTypes.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformTypes.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformTypesCallback } from './types.js';\nexport default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformTypes: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformTypes: unexpected destination directory');\n\n if (typeof options === 'function') {\n callback = options as TransformTypesCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformTypes');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, options, callback);\n return new Promise((resolve, reject) => dispatch(version, src, dest, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["transformTypes","major","process","versions","node","split","version","__dirname","path","dirname","__filename","url","fileURLToPath","workerPath","join","_require","require","Module","createRequire","dispatch","src","dest","options","callback","callbacks","err","Error","tsconfig","loadTsConfig","cwd","Promise","resolve","reject","result"],"mappings":";;;;+BAsBA;;;eAAwBA;;;2DAtBP;0DACD;mEACS;6DAON;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AALnB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,IAAMM,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,YAAG,CAACC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,aAAaL,aAAI,CAACM,IAAI,CAACP,WAAW,MAAM,OAAO,WAAW;AAGhE,IAAMQ,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAE1F,SAASG,SAASb,OAAO,EAAEc,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACrD,IAAIjB,YAAY,SAAS,OAAOS,SAASF,YAAYO,KAAKC,MAAMC,SAASC;IACzE,IAAI;QACFA,SAAS,MAAMR,SAAS,qBAAqB;YAAET,SAAAA;YAASkB,WAAW;QAAK,GAAGX,YAAYO,KAAKC,MAAMC;IACpG,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAGe,SAASzB,eAAeoB,GAAW,EAAEC,IAAY,EAAEC,OAAgD,EAAEC,QAAiC;IACnJ,IAAI;QACF,IAAI,OAAOH,QAAQ,UAAU,MAAM,IAAIM,MAAM;QAC7C,IAAI,OAAOL,SAAS,UAAU,MAAM,IAAIK,MAAM;QAE9C,IAAI,OAAOJ,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,IAAMK,WAAWC,IAAAA,qBAAY,EAAC;YAAEC,KAAKT;WAAQE,UAAW;QACxDA,UAAU;YAAEK,UAAAA;WAAaL;QAEzB,IAAI,OAAOC,aAAa,YAAY,OAAOJ,SAASb,SAASc,KAAKC,MAAMC,SAASC;QACjF,OAAO,IAAIO,QAAQ,SAACC,SAASC;mBAAWb,SAASb,SAASc,KAAKC,MAAMC,SAAS,SAACG,KAAKQ;uBAAYR,MAAMO,OAAOP,OAAOM,QAAQE;;;IAC9H,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
@@ -1,10 +1,2 @@
1
1
  import type { ConfigOptions, TransformDirectoryCallback } from './types.js';
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
2
  export default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]>;
@@ -18,14 +18,7 @@ function dispatch(version, src, dest, type, options, callback) {
18
18
  callback(err);
19
19
  }
20
20
  }
21
- /**
22
- * @param {string} src The source directory to traverse.
23
- * @param {string} dest The output directory to write files to.
24
- * @param {string} type The type of transform ('esm' or 'cjs').
25
- * @param {{sourceMaps: boolean}} options Options to pass to swc.
26
- * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.
27
- * @returns {void | Promise<any>} Optional promise if callback not provided.
28
- */ export default function transformDirectory(src, dest, type, options, callback) {
21
+ export default function transformDirectory(src, dest, type, options, callback) {
29
22
  try {
30
23
  if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');
31
24
  if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformDirectory.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, type, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, type, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, type, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformDirectoryCallback } from './types.js';\n/**\n * @param {string} src The source directory to traverse.\n * @param {string} dest The output directory to write files to.\n * @param {string} type The type of transform ('esm' or 'cjs').\n * @param {{sourceMaps: boolean}} options Options to pass to swc.\n * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.\n * @returns {void | Promise<any>} Optional promise if callback not provided.\n */\nexport default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');\n if (typeof type !== 'string') throw new Error('transformDirectory: unexpected type');\n\n if (typeof options === 'function') {\n callback = options as TransformDirectoryCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformDirectory');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, type, options, callback) as undefined;\n return new Promise((resolve, reject) => dispatch(version, src, dest, type, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["path","url","loadTsConfig","major","process","versions","node","split","version","__dirname","dirname","__filename","fileURLToPath","workerPath","join","Module","_require","require","createRequire","dispatch","src","dest","type","options","callback","callbacks","err","transformDirectory","Error","tsconfig","cwd","Promise","resolve","reject","result"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,OAAOC,kBAAkB,oBAAoB;AAE7C,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,MAAMM,YAAYT,KAAKU,OAAO,CAAC,OAAOC,eAAe,cAAcV,IAAIW,aAAa,CAAC,YAAYX,GAAG,IAAIU;AACxG,MAAME,aAAab,KAAKc,IAAI,CAACL,WAAW,MAAM,OAAO,WAAW;AAEhE,OAAOM,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYjB,GAAG,IAAIgB;AAE1F,SAASE,SAASX,OAAO,EAAEY,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,IAAIhB,YAAY,SAAS,OAAOQ,SAASH,YAAYO,KAAKC,MAAMC,MAAMC,SAASC;IAC/E,IAAI;QACFA,SAAS,MAAMR,SAAS,qBAAqB;YAAER;YAASiB,WAAW;QAAK,GAAGZ,YAAYO,KAAKC,MAAMC,MAAMC;IAC1G,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAGA;;;;;;;CAOC,GACD,eAAe,SAASC,mBAAmBP,GAAW,EAAEC,IAAY,EAAEC,IAAY,EAAEC,OAAoD,EAAEC,QAAqC;IAC7K,IAAI;QACF,IAAI,OAAOJ,QAAQ,UAAU,MAAM,IAAIQ,MAAM;QAC7C,IAAI,OAAOP,SAAS,UAAU,MAAM,IAAIO,MAAM;QAC9C,IAAI,OAAON,SAAS,UAAU,MAAM,IAAIM,MAAM;QAE9C,IAAI,OAAOL,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,MAAMM,WAAW3B,aAAa;YAAE4B,KAAKV;YAAK,GAAGG,OAAO;QAAC,GAAG;QACxDA,UAAU;YAAEM;YAAU,GAAGN,OAAO;QAAC;QAEjC,IAAI,OAAOC,aAAa,YAAY,OAAOL,SAASX,SAASY,KAAKC,MAAMC,MAAMC,SAASC;QACvF,OAAO,IAAIO,QAAQ,CAACC,SAASC,SAAWd,SAASX,SAASY,KAAKC,MAAMC,MAAMC,SAAS,CAACG,KAAKQ,SAAYR,MAAMO,OAAOP,OAAOM,QAAQE;IACpI,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformDirectory.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, type, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, type, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, type, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformDirectoryCallback } from './types.js';\nexport default function transformDirectory(src: string, dest: string, type: string, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');\n if (typeof type !== 'string') throw new Error('transformDirectory: unexpected type');\n\n if (typeof options === 'function') {\n callback = options as TransformDirectoryCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformDirectory');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, type, options, callback) as undefined;\n return new Promise((resolve, reject) => dispatch(version, src, dest, type, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["path","url","loadTsConfig","major","process","versions","node","split","version","__dirname","dirname","__filename","fileURLToPath","workerPath","join","Module","_require","require","createRequire","dispatch","src","dest","type","options","callback","callbacks","err","transformDirectory","Error","tsconfig","cwd","Promise","resolve","reject","result"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,OAAOC,kBAAkB,oBAAoB;AAE7C,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,MAAMM,YAAYT,KAAKU,OAAO,CAAC,OAAOC,eAAe,cAAcV,IAAIW,aAAa,CAAC,YAAYX,GAAG,IAAIU;AACxG,MAAME,aAAab,KAAKc,IAAI,CAACL,WAAW,MAAM,OAAO,WAAW;AAEhE,OAAOM,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYjB,GAAG,IAAIgB;AAE1F,SAASE,SAASX,OAAO,EAAEY,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,IAAIhB,YAAY,SAAS,OAAOQ,SAASH,YAAYO,KAAKC,MAAMC,MAAMC,SAASC;IAC/E,IAAI;QACFA,SAAS,MAAMR,SAAS,qBAAqB;YAAER;YAASiB,WAAW;QAAK,GAAGZ,YAAYO,KAAKC,MAAMC,MAAMC;IAC1G,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAGA,eAAe,SAASC,mBAAmBP,GAAW,EAAEC,IAAY,EAAEC,IAAY,EAAEC,OAAoD,EAAEC,QAAqC;IAC7K,IAAI;QACF,IAAI,OAAOJ,QAAQ,UAAU,MAAM,IAAIQ,MAAM;QAC7C,IAAI,OAAOP,SAAS,UAAU,MAAM,IAAIO,MAAM;QAC9C,IAAI,OAAON,SAAS,UAAU,MAAM,IAAIM,MAAM;QAE9C,IAAI,OAAOL,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,MAAMM,WAAW3B,aAAa;YAAE4B,KAAKV;YAAK,GAAGG,OAAO;QAAC,GAAG;QACxDA,UAAU;YAAEM;YAAU,GAAGN,OAAO;QAAC;QAEjC,IAAI,OAAOC,aAAa,YAAY,OAAOL,SAASX,SAASY,KAAKC,MAAMC,MAAMC,SAASC;QACvF,OAAO,IAAIO,QAAQ,CAACC,SAASC,SAAWd,SAASX,SAASY,KAAKC,MAAMC,MAAMC,SAAS,CAACG,KAAKQ,SAAYR,MAAMO,OAAOP,OAAOM,QAAQE;IACpI,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
@@ -1,9 +1,3 @@
1
1
  import type { Output } from '@swc/core';
2
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
3
  export default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output;
@@ -11,12 +11,7 @@ function dispatch(version, contents, fileName, tsconfig) {
11
11
  if (version === 'local') return _require(workerPath)(contents, fileName, tsconfig);
12
12
  return _require('node-version-call')(version, workerPath, contents, fileName, tsconfig);
13
13
  }
14
- /**
15
- * @param {string} contents The file contents.
16
- * @param {string} fileName The filename.
17
- * @param {TsConfigResult} tsconfig The configuration.
18
- * @returns {{ code: string, map?: string }} Returns object with the transformed code and source map if option sourceMaps was provided.
19
- */ export default function transformSync(contents, fileName, tsconfig) {
14
+ export default function transformSync(contents, fileName, tsconfig) {
20
15
  if (typeof contents !== 'string') throw new Error('transformTypes: unexpected contents');
21
16
  if (typeof fileName !== 'string') throw new Error('transformTypes: unexpected fileName');
22
17
  if (!tsconfig) tsconfig = getTS.getTsconfig(process.cwd());
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformSync.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport * as getTS from 'get-tsconfig-compat';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformSync.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, contents, fileName, tsconfig) {\n if (version === 'local') return _require(workerPath)(contents, fileName, tsconfig);\n return _require('node-version-call')(version, workerPath, contents, fileName, tsconfig);\n}\n\nimport type { Output } from '@swc/core';\nimport type { TsConfigResult } from 'get-tsconfig-compat';\n/**\n * @param {string} contents The file contents.\n * @param {string} fileName The filename.\n * @param {TsConfigResult} tsconfig The configuration.\n * @returns {{ code: string, map?: string }} Returns object with the transformed code and source map if option sourceMaps was provided.\n */\nexport default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output {\n if (typeof contents !== 'string') throw new Error('transformTypes: unexpected contents');\n if (typeof fileName !== 'string') throw new Error('transformTypes: unexpected fileName');\n if (!tsconfig) tsconfig = getTS.getTsconfig(process.cwd());\n return dispatch(version, contents, fileName, tsconfig);\n}\n"],"names":["path","url","getTS","major","process","versions","node","split","version","__dirname","dirname","__filename","fileURLToPath","workerPath","join","Module","_require","require","createRequire","dispatch","contents","fileName","tsconfig","transformSync","Error","getTsconfig","cwd"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,YAAYC,WAAW,sBAAsB;AAE7C,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,MAAMM,YAAYT,KAAKU,OAAO,CAAC,OAAOC,eAAe,cAAcV,IAAIW,aAAa,CAAC,YAAYX,GAAG,IAAIU;AACxG,MAAME,aAAab,KAAKc,IAAI,CAACL,WAAW,MAAM,OAAO,WAAW;AAEhE,OAAOM,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYjB,GAAG,IAAIgB;AAE1F,SAASE,SAASX,OAAO,EAAEY,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ;IACrD,IAAId,YAAY,SAAS,OAAOQ,SAASH,YAAYO,UAAUC,UAAUC;IACzE,OAAON,SAAS,qBAAqBR,SAASK,YAAYO,UAAUC,UAAUC;AAChF;AAIA;;;;;CAKC,GACD,eAAe,SAASC,cAAcH,QAAgB,EAAEC,QAAgB,EAAEC,QAAwB;IAChG,IAAI,OAAOF,aAAa,UAAU,MAAM,IAAII,MAAM;IAClD,IAAI,OAAOH,aAAa,UAAU,MAAM,IAAIG,MAAM;IAClD,IAAI,CAACF,UAAUA,WAAWpB,MAAMuB,WAAW,CAACrB,QAAQsB,GAAG;IACvD,OAAOP,SAASX,SAASY,UAAUC,UAAUC;AAC/C"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformSync.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport * as getTS from 'get-tsconfig-compat';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformSync.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, contents, fileName, tsconfig) {\n if (version === 'local') return _require(workerPath)(contents, fileName, tsconfig);\n return _require('node-version-call')(version, workerPath, contents, fileName, tsconfig);\n}\n\nimport type { Output } from '@swc/core';\nimport type { TsConfigResult } from 'get-tsconfig-compat';\nexport default function transformSync(contents: string, fileName: string, tsconfig: TsConfigResult): Output {\n if (typeof contents !== 'string') throw new Error('transformTypes: unexpected contents');\n if (typeof fileName !== 'string') throw new Error('transformTypes: unexpected fileName');\n if (!tsconfig) tsconfig = getTS.getTsconfig(process.cwd());\n return dispatch(version, contents, fileName, tsconfig);\n}\n"],"names":["path","url","getTS","major","process","versions","node","split","version","__dirname","dirname","__filename","fileURLToPath","workerPath","join","Module","_require","require","createRequire","dispatch","contents","fileName","tsconfig","transformSync","Error","getTsconfig","cwd"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,YAAYC,WAAW,sBAAsB;AAE7C,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,MAAMM,YAAYT,KAAKU,OAAO,CAAC,OAAOC,eAAe,cAAcV,IAAIW,aAAa,CAAC,YAAYX,GAAG,IAAIU;AACxG,MAAME,aAAab,KAAKc,IAAI,CAACL,WAAW,MAAM,OAAO,WAAW;AAEhE,OAAOM,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYjB,GAAG,IAAIgB;AAE1F,SAASE,SAASX,OAAO,EAAEY,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ;IACrD,IAAId,YAAY,SAAS,OAAOQ,SAASH,YAAYO,UAAUC,UAAUC;IACzE,OAAON,SAAS,qBAAqBR,SAASK,YAAYO,UAAUC,UAAUC;AAChF;AAIA,eAAe,SAASC,cAAcH,QAAgB,EAAEC,QAAgB,EAAEC,QAAwB;IAChG,IAAI,OAAOF,aAAa,UAAU,MAAM,IAAII,MAAM;IAClD,IAAI,OAAOH,aAAa,UAAU,MAAM,IAAIG,MAAM;IAClD,IAAI,CAACF,UAAUA,WAAWpB,MAAMuB,WAAW,CAACrB,QAAQsB,GAAG;IACvD,OAAOP,SAASX,SAASY,UAAUC,UAAUC;AAC/C"}
@@ -1,9 +1,2 @@
1
1
  import type { ConfigOptions, TransformTypesCallback } from './types.js';
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
2
  export default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]>;
@@ -18,13 +18,7 @@ function dispatch(version, src, dest, options, callback) {
18
18
  callback(err);
19
19
  }
20
20
  }
21
- /**
22
- * @param {string} src The source directory to traverse.
23
- * @param {string} dest The output directory to write files to.
24
- * @param {{tsconfig: TsConfigResult}} options Options.
25
- * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.
26
- * @returns {void | Promise<any>} Optional promise if callback not provided.
27
- */ export default function transformTypes(src, dest, options, callback) {
21
+ export default function transformTypes(src, dest, options, callback) {
28
22
  try {
29
23
  if (typeof src !== 'string') throw new Error('transformTypes: unexpected source');
30
24
  if (typeof dest !== 'string') throw new Error('transformTypes: unexpected destination directory');
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformTypes.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformTypes.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformTypesCallback } from './types.js';\n/**\n * @param {string} src The source directory to traverse.\n * @param {string} dest The output directory to write files to.\n * @param {{tsconfig: TsConfigResult}} options Options.\n * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.\n * @returns {void | Promise<any>} Optional promise if callback not provided.\n */\nexport default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformTypes: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformTypes: unexpected destination directory');\n\n if (typeof options === 'function') {\n callback = options as TransformTypesCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformTypes');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, options, callback);\n return new Promise((resolve, reject) => dispatch(version, src, dest, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["path","url","loadTsConfig","major","process","versions","node","split","version","__dirname","dirname","__filename","fileURLToPath","workerPath","join","Module","_require","require","createRequire","dispatch","src","dest","options","callback","callbacks","err","transformTypes","Error","tsconfig","cwd","Promise","resolve","reject","result"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,OAAOC,kBAAkB,oBAAoB;AAE7C,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,MAAMM,YAAYT,KAAKU,OAAO,CAAC,OAAOC,eAAe,cAAcV,IAAIW,aAAa,CAAC,YAAYX,GAAG,IAAIU;AACxG,MAAME,aAAab,KAAKc,IAAI,CAACL,WAAW,MAAM,OAAO,WAAW;AAEhE,OAAOM,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYjB,GAAG,IAAIgB;AAE1F,SAASE,SAASX,OAAO,EAAEY,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACrD,IAAIf,YAAY,SAAS,OAAOQ,SAASH,YAAYO,KAAKC,MAAMC,SAASC;IACzE,IAAI;QACFA,SAAS,MAAMP,SAAS,qBAAqB;YAAER;YAASgB,WAAW;QAAK,GAAGX,YAAYO,KAAKC,MAAMC;IACpG,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAGA;;;;;;CAMC,GACD,eAAe,SAASC,eAAeN,GAAW,EAAEC,IAAY,EAAEC,OAAgD,EAAEC,QAAiC;IACnJ,IAAI;QACF,IAAI,OAAOH,QAAQ,UAAU,MAAM,IAAIO,MAAM;QAC7C,IAAI,OAAON,SAAS,UAAU,MAAM,IAAIM,MAAM;QAE9C,IAAI,OAAOL,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,MAAMM,WAAW1B,aAAa;YAAE2B,KAAKT;YAAK,GAAGE,OAAO;QAAC,GAAG;QACxDA,UAAU;YAAEM;YAAU,GAAGN,OAAO;QAAC;QAEjC,IAAI,OAAOC,aAAa,YAAY,OAAOJ,SAASX,SAASY,KAAKC,MAAMC,SAASC;QACjF,OAAO,IAAIO,QAAQ,CAACC,SAASC,SAAWb,SAASX,SAASY,KAAKC,MAAMC,SAAS,CAACG,KAAKQ,SAAYR,MAAMO,OAAOP,OAAOM,QAAQE;IAC9H,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/transformTypes.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport loadTsConfig from './loadTsConfig.js';\n\nconst major = +process.versions.node.split('.')[0];\nconst version = major < 14 ? 'stable' : 'local';\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst workerPath = path.join(__dirname, '..', 'cjs', 'workers', 'transformTypes.js');\n\nimport Module from 'module';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nfunction dispatch(version, src, dest, options, callback) {\n if (version === 'local') return _require(workerPath)(src, dest, options, callback);\n try {\n callback(null, _require('node-version-call')({ version, callbacks: true }, workerPath, src, dest, options));\n } catch (err) {\n callback(err);\n }\n}\n\nimport type { ConfigOptions, TransformTypesCallback } from './types.js';\nexport default function transformTypes(src: string, dest: string, options?: ConfigOptions | TransformTypesCallback, callback?: TransformTypesCallback): undefined | Promise<string[]> {\n try {\n if (typeof src !== 'string') throw new Error('transformTypes: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformTypes: unexpected destination directory');\n\n if (typeof options === 'function') {\n callback = options as TransformTypesCallback;\n options = null;\n }\n options = options || {};\n const tsconfig = loadTsConfig({ cwd: src, ...options }, 'transformTypes');\n options = { tsconfig, ...options };\n\n if (typeof callback === 'function') return dispatch(version, src, dest, options, callback);\n return new Promise((resolve, reject) => dispatch(version, src, dest, options, (err, result) => (err ? reject(err) : resolve(result))));\n } catch (err) {\n if (callback) callback(err);\n else return Promise.reject(err);\n }\n}\n"],"names":["path","url","loadTsConfig","major","process","versions","node","split","version","__dirname","dirname","__filename","fileURLToPath","workerPath","join","Module","_require","require","createRequire","dispatch","src","dest","options","callback","callbacks","err","transformTypes","Error","tsconfig","cwd","Promise","resolve","reject","result"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,OAAOC,kBAAkB,oBAAoB;AAE7C,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,UAAUL,QAAQ,KAAK,WAAW;AACxC,MAAMM,YAAYT,KAAKU,OAAO,CAAC,OAAOC,eAAe,cAAcV,IAAIW,aAAa,CAAC,YAAYX,GAAG,IAAIU;AACxG,MAAME,aAAab,KAAKc,IAAI,CAACL,WAAW,MAAM,OAAO,WAAW;AAEhE,OAAOM,YAAY,SAAS;AAC5B,MAAMC,WAAW,OAAOC,YAAY,cAAcF,OAAOG,aAAa,CAAC,YAAYjB,GAAG,IAAIgB;AAE1F,SAASE,SAASX,OAAO,EAAEY,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACrD,IAAIf,YAAY,SAAS,OAAOQ,SAASH,YAAYO,KAAKC,MAAMC,SAASC;IACzE,IAAI;QACFA,SAAS,MAAMP,SAAS,qBAAqB;YAAER;YAASgB,WAAW;QAAK,GAAGX,YAAYO,KAAKC,MAAMC;IACpG,EAAE,OAAOG,KAAK;QACZF,SAASE;IACX;AACF;AAGA,eAAe,SAASC,eAAeN,GAAW,EAAEC,IAAY,EAAEC,OAAgD,EAAEC,QAAiC;IACnJ,IAAI;QACF,IAAI,OAAOH,QAAQ,UAAU,MAAM,IAAIO,MAAM;QAC7C,IAAI,OAAON,SAAS,UAAU,MAAM,IAAIM,MAAM;QAE9C,IAAI,OAAOL,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QACtB,MAAMM,WAAW1B,aAAa;YAAE2B,KAAKT;YAAK,GAAGE,OAAO;QAAC,GAAG;QACxDA,UAAU;YAAEM;YAAU,GAAGN,OAAO;QAAC;QAEjC,IAAI,OAAOC,aAAa,YAAY,OAAOJ,SAASX,SAASY,KAAKC,MAAMC,SAASC;QACjF,OAAO,IAAIO,QAAQ,CAACC,SAASC,SAAWb,SAASX,SAASY,KAAKC,MAAMC,SAAS,CAACG,KAAKQ,SAAYR,MAAMO,OAAOP,OAAOM,QAAQE;IAC9H,EAAE,OAAOR,KAAK;QACZ,IAAIF,UAAUA,SAASE;aAClB,OAAOK,QAAQE,MAAM,CAACP;IAC7B;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-swc-transform",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
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.3.11",
49
+ "fs-iterator": "^5.3.13",
50
50
  "get-tsconfig-compat": "^2.0.3",
51
- "install-optional": "^0.1.58",
51
+ "install-optional": "^0.1.61",
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.7.5",
56
+ "node-version-call": "^1.7.7",
57
57
  "path-posix": "^1.0.0",
58
- "queue-cb": "^1.5.0",
58
+ "queue-cb": "^1.5.2",
59
59
  "resolve": "^1.22.10",
60
60
  "rimraf2": "^2.8.2",
61
61
  "ts-node": "*",