ts-swc-transform 1.5.0 → 1.5.1

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.
@@ -72,6 +72,9 @@ function _object_spread_props(target, source) {
72
72
  }
73
73
  return target;
74
74
  }
75
+ var SKIPS = [
76
+ '.DS_Store'
77
+ ];
75
78
  function transformDirectoryWorker(src, dest, type, options, callback) {
76
79
  var tsconfig = options.tsconfig ? options.tsconfig : _gettsconfigcompat.default.getTsconfig(src);
77
80
  var matcher = (0, _createMatcher.default)(tsconfig);
@@ -81,6 +84,7 @@ function transformDirectoryWorker(src, dest, type, options, callback) {
81
84
  if (!entry.stats.isFile()) return;
82
85
  if (!matcher(entry.fullPath)) return;
83
86
  if (_constants.typeFileRegEx.test(entry.basename)) return;
87
+ if (SKIPS.indexOf(entry.basename) >= 0) return;
84
88
  entries.push(entry);
85
89
  }, function(err) {
86
90
  if (err) return callback(err);
@@ -1 +1 @@
1
- {"version":3,"sources":["transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator from 'fs-iterator';\nimport getTS from 'get-tsconfig-compat';\nimport Queue from 'queue-cb';\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from './transformFile.js';\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig ? options.tsconfig : getTS.getTsconfig(src);\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 (!matcher(entry.fullPath)) return;\n if (typeFileRegEx.test(entry.basename)) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n\n options = { ...options, tsconfig };\n const queue = new Queue();\n entries.forEach((entry) => queue.defer(transformFile.bind(null, entry.fullPath, path.dirname(path.join(dest, entry.path)), type, options)));\n queue.await(callback);\n }\n );\n}\n"],"names":["transformDirectoryWorker","src","dest","type","options","callback","tsconfig","getTS","getTsconfig","matcher","createMatcher","entries","iterator","Iterator","forEach","entry","stats","isFile","fullPath","typeFileRegEx","test","basename","push","err","queue","Queue","defer","transformFile","bind","path","dirname","join","await"],"mappings":";;;;+BASA;;;eAAwBA;;;2DATP;iEACI;wEACH;8DACA;yBAEY;oEACJ;oEACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEX,SAASA,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,IAAMC,WAAWF,QAAQE,QAAQ,GAAGF,QAAQE,QAAQ,GAAGC,0BAAK,CAACC,WAAW,CAACP;IACzE,IAAMQ,UAAUC,IAAAA,sBAAa,EAACJ;IAE9B,IAAMK,UAAU,EAAE;IAClB,IAAMC,WAAW,IAAIC,mBAAQ,CAACZ;IAC9BW,SAASE,OAAO,CACd,SAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAI,CAACR,QAAQM,MAAMG,QAAQ,GAAG;QAC9B,IAAIC,wBAAa,CAACC,IAAI,CAACL,MAAMM,QAAQ,GAAG;QACxCV,QAAQW,IAAI,CAACP;IACf,GACA,SAACQ;QACC,IAAIA,KAAK,OAAOlB,SAASkB;QAEzBnB,UAAU,wCAAKA;YAASE,UAAAA;;QACxB,IAAMkB,QAAQ,IAAIC,gBAAK;QACvBd,QAAQG,OAAO,CAAC,SAACC;mBAAUS,MAAME,KAAK,CAACC,sBAAa,CAACC,IAAI,CAAC,MAAMb,MAAMG,QAAQ,EAAEW,aAAI,CAACC,OAAO,CAACD,aAAI,CAACE,IAAI,CAAC7B,MAAMa,MAAMc,IAAI,IAAI1B,MAAMC;;QACjIoB,MAAMQ,KAAK,CAAC3B;IACd;AAEJ"}
1
+ {"version":3,"sources":["transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator from 'fs-iterator';\nimport getTS from 'get-tsconfig-compat';\nimport Queue from 'queue-cb';\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from './transformFile.js';\n\nconst SKIPS = ['.DS_Store'];\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig ? options.tsconfig : getTS.getTsconfig(src);\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 (!matcher(entry.fullPath)) return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (SKIPS.indexOf(entry.basename) >= 0) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n\n options = { ...options, tsconfig };\n const queue = new Queue();\n entries.forEach((entry) => queue.defer(transformFile.bind(null, entry.fullPath, path.dirname(path.join(dest, entry.path)), type, options)));\n queue.await(callback);\n }\n );\n}\n"],"names":["transformDirectoryWorker","SKIPS","src","dest","type","options","callback","tsconfig","getTS","getTsconfig","matcher","createMatcher","entries","iterator","Iterator","forEach","entry","stats","isFile","fullPath","typeFileRegEx","test","basename","indexOf","push","err","queue","Queue","defer","transformFile","bind","path","dirname","join","await"],"mappings":";;;;+BAWA;;;eAAwBA;;;2DAXP;iEACI;wEACH;8DACA;yBAEY;oEACJ;oEACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,IAAMC,QAAQ;IAAC;CAAY;AAEZ,SAASD,yBAAyBE,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,IAAMC,WAAWF,QAAQE,QAAQ,GAAGF,QAAQE,QAAQ,GAAGC,0BAAK,CAACC,WAAW,CAACP;IACzE,IAAMQ,UAAUC,IAAAA,sBAAa,EAACJ;IAE9B,IAAMK,UAAU,EAAE;IAClB,IAAMC,WAAW,IAAIC,mBAAQ,CAACZ;IAC9BW,SAASE,OAAO,CACd,SAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAI,CAACR,QAAQM,MAAMG,QAAQ,GAAG;QAC9B,IAAIC,wBAAa,CAACC,IAAI,CAACL,MAAMM,QAAQ,GAAG;QACxC,IAAIrB,MAAMsB,OAAO,CAACP,MAAMM,QAAQ,KAAK,GAAG;QACxCV,QAAQY,IAAI,CAACR;IACf,GACA,SAACS;QACC,IAAIA,KAAK,OAAOnB,SAASmB;QAEzBpB,UAAU,wCAAKA;YAASE,UAAAA;;QACxB,IAAMmB,QAAQ,IAAIC,gBAAK;QACvBf,QAAQG,OAAO,CAAC,SAACC;mBAAUU,MAAME,KAAK,CAACC,sBAAa,CAACC,IAAI,CAAC,MAAMd,MAAMG,QAAQ,EAAEY,aAAI,CAACC,OAAO,CAACD,aAAI,CAACE,IAAI,CAAC9B,MAAMa,MAAMe,IAAI,IAAI3B,MAAMC;;QACjIqB,MAAMQ,KAAK,CAAC5B;IACd;AAEJ"}
@@ -5,6 +5,9 @@ import Queue from 'queue-cb';
5
5
  import { typeFileRegEx } from '../constants.mjs';
6
6
  import createMatcher from '../createMatcher.mjs';
7
7
  import transformFile from './transformFile.mjs';
8
+ const SKIPS = [
9
+ '.DS_Store'
10
+ ];
8
11
  export default function transformDirectoryWorker(src, dest, type, options, callback) {
9
12
  const tsconfig = options.tsconfig ? options.tsconfig : getTS.getTsconfig(src);
10
13
  const matcher = createMatcher(tsconfig);
@@ -14,6 +17,7 @@ export default function transformDirectoryWorker(src, dest, type, options, callb
14
17
  if (!entry.stats.isFile()) return;
15
18
  if (!matcher(entry.fullPath)) return;
16
19
  if (typeFileRegEx.test(entry.basename)) return;
20
+ if (SKIPS.indexOf(entry.basename) >= 0) return;
17
21
  entries.push(entry);
18
22
  }, (err)=>{
19
23
  if (err) return callback(err);
@@ -1 +1 @@
1
- {"version":3,"sources":["transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator from 'fs-iterator';\nimport getTS from 'get-tsconfig-compat';\nimport Queue from 'queue-cb';\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from './transformFile.js';\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig ? options.tsconfig : getTS.getTsconfig(src);\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 (!matcher(entry.fullPath)) return;\n if (typeFileRegEx.test(entry.basename)) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n\n options = { ...options, tsconfig };\n const queue = new Queue();\n entries.forEach((entry) => queue.defer(transformFile.bind(null, entry.fullPath, path.dirname(path.join(dest, entry.path)), type, options)));\n queue.await(callback);\n }\n );\n}\n"],"names":["path","Iterator","getTS","Queue","typeFileRegEx","createMatcher","transformFile","transformDirectoryWorker","src","dest","type","options","callback","tsconfig","getTsconfig","matcher","entries","iterator","forEach","entry","stats","isFile","fullPath","test","basename","push","err","queue","defer","bind","dirname","join","await"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,cAAc,cAAc;AACnC,OAAOC,WAAW,sBAAsB;AACxC,OAAOC,WAAW,WAAW;AAE7B,SAASC,aAAa,QAAQ,kBAAkB;AAChD,OAAOC,mBAAmB,sBAAsB;AAChD,OAAOC,mBAAmB,qBAAqB;AAE/C,eAAe,SAASC,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,MAAMC,WAAWF,QAAQE,QAAQ,GAAGF,QAAQE,QAAQ,GAAGX,MAAMY,WAAW,CAACN;IACzE,MAAMO,UAAUV,cAAcQ;IAE9B,MAAMG,UAAU,EAAE;IAClB,MAAMC,WAAW,IAAIhB,SAASO;IAC9BS,SAASC,OAAO,CACd,CAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAI,CAACN,QAAQI,MAAMG,QAAQ,GAAG;QAC9B,IAAIlB,cAAcmB,IAAI,CAACJ,MAAMK,QAAQ,GAAG;QACxCR,QAAQS,IAAI,CAACN;IACf,GACA,CAACO;QACC,IAAIA,KAAK,OAAOd,SAASc;QAEzBf,UAAU;YAAE,GAAGA,OAAO;YAAEE;QAAS;QACjC,MAAMc,QAAQ,IAAIxB;QAClBa,QAAQE,OAAO,CAAC,CAACC,QAAUQ,MAAMC,KAAK,CAACtB,cAAcuB,IAAI,CAAC,MAAMV,MAAMG,QAAQ,EAAEtB,KAAK8B,OAAO,CAAC9B,KAAK+B,IAAI,CAACtB,MAAMU,MAAMnB,IAAI,IAAIU,MAAMC;QACjIgB,MAAMK,KAAK,CAACpB;IACd;AAEJ"}
1
+ {"version":3,"sources":["transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator from 'fs-iterator';\nimport getTS from 'get-tsconfig-compat';\nimport Queue from 'queue-cb';\n\nimport { typeFileRegEx } from '../constants.js';\nimport createMatcher from '../createMatcher.js';\nimport transformFile from './transformFile.js';\n\nconst SKIPS = ['.DS_Store'];\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig ? options.tsconfig : getTS.getTsconfig(src);\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 (!matcher(entry.fullPath)) return;\n if (typeFileRegEx.test(entry.basename)) return;\n if (SKIPS.indexOf(entry.basename) >= 0) return;\n entries.push(entry);\n },\n (err) => {\n if (err) return callback(err);\n\n options = { ...options, tsconfig };\n const queue = new Queue();\n entries.forEach((entry) => queue.defer(transformFile.bind(null, entry.fullPath, path.dirname(path.join(dest, entry.path)), type, options)));\n queue.await(callback);\n }\n );\n}\n"],"names":["path","Iterator","getTS","Queue","typeFileRegEx","createMatcher","transformFile","SKIPS","transformDirectoryWorker","src","dest","type","options","callback","tsconfig","getTsconfig","matcher","entries","iterator","forEach","entry","stats","isFile","fullPath","test","basename","indexOf","push","err","queue","defer","bind","dirname","join","await"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,cAAc,cAAc;AACnC,OAAOC,WAAW,sBAAsB;AACxC,OAAOC,WAAW,WAAW;AAE7B,SAASC,aAAa,QAAQ,kBAAkB;AAChD,OAAOC,mBAAmB,sBAAsB;AAChD,OAAOC,mBAAmB,qBAAqB;AAE/C,MAAMC,QAAQ;IAAC;CAAY;AAE3B,eAAe,SAASC,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,MAAMC,WAAWF,QAAQE,QAAQ,GAAGF,QAAQE,QAAQ,GAAGZ,MAAMa,WAAW,CAACN;IACzE,MAAMO,UAAUX,cAAcS;IAE9B,MAAMG,UAAU,EAAE;IAClB,MAAMC,WAAW,IAAIjB,SAASQ;IAC9BS,SAASC,OAAO,CACd,CAACC;QACC,IAAI,CAACA,MAAMC,KAAK,CAACC,MAAM,IAAI;QAC3B,IAAI,CAACN,QAAQI,MAAMG,QAAQ,GAAG;QAC9B,IAAInB,cAAcoB,IAAI,CAACJ,MAAMK,QAAQ,GAAG;QACxC,IAAIlB,MAAMmB,OAAO,CAACN,MAAMK,QAAQ,KAAK,GAAG;QACxCR,QAAQU,IAAI,CAACP;IACf,GACA,CAACQ;QACC,IAAIA,KAAK,OAAOf,SAASe;QAEzBhB,UAAU;YAAE,GAAGA,OAAO;YAAEE;QAAS;QACjC,MAAMe,QAAQ,IAAI1B;QAClBc,QAAQE,OAAO,CAAC,CAACC,QAAUS,MAAMC,KAAK,CAACxB,cAAcyB,IAAI,CAAC,MAAMX,MAAMG,QAAQ,EAAEvB,KAAKgC,OAAO,CAAChC,KAAKiC,IAAI,CAACvB,MAAMU,MAAMpB,IAAI,IAAIW,MAAMC;QACjIiB,MAAMK,KAAK,CAACrB;IACd;AAEJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-swc-transform",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Typescript transformers for swc. Supports Node >= 0.8",
5
5
  "keywords": [
6
6
  "matcher",
@@ -78,7 +78,7 @@
78
78
  "core-js": "^3.39.0",
79
79
  "cr": "^0.1.0",
80
80
  "react": "^19.0.0",
81
- "ts-dev-stack": "^1.4.5",
81
+ "ts-dev-stack": "^1.4.6",
82
82
  "ts-node": "^10.8.2",
83
83
  "typescript": "^5.7.2"
84
84
  },