innetjs 2.2.17 → 2.2.19

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 (4) hide show
  1. package/bin/innet +10 -3
  2. package/index.js +10 -3
  3. package/index.mjs +10 -3
  4. package/package.json +2 -2
package/bin/innet CHANGED
@@ -191,6 +191,8 @@ const execAsync = node_util.promisify(exec);
191
191
  const copyFiles = node_util.promisify(fs__default["default"].copy);
192
192
  updateDotenv();
193
193
  const REG_CLEAR_TEXT = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
194
+ const REG_TJSX = /\.[tj]sx?$/;
195
+ const REG_EXT = /\.([^.]+)$/;
194
196
  const scriptExtensions = ['ts', 'js', 'tsx', 'jsx'];
195
197
  const indexExt = scriptExtensions.join(',');
196
198
  class InnetJS {
@@ -519,7 +521,13 @@ class InnetJS {
519
521
  treeshake: false,
520
522
  output: {
521
523
  dir: releaseFolder,
522
- entryFileNames: `[name]${ext}`,
524
+ entryFileNames: ({ name, facadeModuleId }) => {
525
+ if (REG_TJSX.test(facadeModuleId)) {
526
+ return `${name}${ext}`;
527
+ }
528
+ const match = facadeModuleId.match(REG_EXT);
529
+ return match ? `${name}${match[0]}${ext}` : `${name}${ext}`;
530
+ },
523
531
  format,
524
532
  preserveModules: true,
525
533
  exports: 'named',
@@ -548,7 +556,6 @@ class InnetJS {
548
556
  modules: cssModules,
549
557
  minimize: true,
550
558
  autoModules: true,
551
- dts: true,
552
559
  }),
553
560
  pluginNodeResolve.nodeResolve(),
554
561
  ],
@@ -753,7 +760,7 @@ class InnetJS {
753
760
  }
754
761
 
755
762
  (function () {
756
- const env = {"__INNETJS__PACKAGE_VERSION":"2.2.17"};
763
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.2.19"};
757
764
  if (typeof process === 'undefined') {
758
765
  globalThis.process = { env: env };
759
766
  } else if (process.env) {
package/index.js CHANGED
@@ -73,7 +73,7 @@ var typescript__default = /*#__PURE__*/_interopDefaultLegacy(typescript);
73
73
  var tmp__default = /*#__PURE__*/_interopDefaultLegacy(tmp);
74
74
 
75
75
  (function () {
76
- const env = {"__INNETJS__PACKAGE_VERSION":"2.2.17"};
76
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.2.19"};
77
77
  if (typeof process === 'undefined') {
78
78
  globalThis.process = { env: env };
79
79
  } else if (process.env) {
@@ -90,6 +90,8 @@ const execAsync = node_util.promisify(exec);
90
90
  const copyFiles = node_util.promisify(fs__default["default"].copy);
91
91
  updateDotenv.updateDotenv();
92
92
  const REG_CLEAR_TEXT = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
93
+ const REG_TJSX = /\.[tj]sx?$/;
94
+ const REG_EXT = /\.([^.]+)$/;
93
95
  const scriptExtensions = ['ts', 'js', 'tsx', 'jsx'];
94
96
  const indexExt = scriptExtensions.join(',');
95
97
  class InnetJS {
@@ -418,7 +420,13 @@ class InnetJS {
418
420
  treeshake: false,
419
421
  output: {
420
422
  dir: releaseFolder,
421
- entryFileNames: `[name]${ext}`,
423
+ entryFileNames: ({ name, facadeModuleId }) => {
424
+ if (REG_TJSX.test(facadeModuleId)) {
425
+ return `${name}${ext}`;
426
+ }
427
+ const match = facadeModuleId.match(REG_EXT);
428
+ return match ? `${name}${match[0]}${ext}` : `${name}${ext}`;
429
+ },
422
430
  format,
423
431
  preserveModules: true,
424
432
  exports: 'named',
@@ -447,7 +455,6 @@ class InnetJS {
447
455
  modules: cssModules,
448
456
  minimize: true,
449
457
  autoModules: true,
450
- dts: true,
451
458
  }),
452
459
  pluginNodeResolve.nodeResolve(),
453
460
  ],
package/index.mjs CHANGED
@@ -38,7 +38,7 @@ import { reporter, convertIndexFile, getFile } from './helpers.mjs';
38
38
  import { updateDotenv } from './updateDotenv.mjs';
39
39
 
40
40
  (function () {
41
- const env = {"__INNETJS__PACKAGE_VERSION":"2.2.17"};
41
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.2.19"};
42
42
  if (typeof process === 'undefined') {
43
43
  globalThis.process = { env: env };
44
44
  } else if (process.env) {
@@ -55,6 +55,8 @@ const execAsync = promisify(exec);
55
55
  const copyFiles = promisify(fs.copy);
56
56
  updateDotenv();
57
57
  const REG_CLEAR_TEXT = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
58
+ const REG_TJSX = /\.[tj]sx?$/;
59
+ const REG_EXT = /\.([^.]+)$/;
58
60
  const scriptExtensions = ['ts', 'js', 'tsx', 'jsx'];
59
61
  const indexExt = scriptExtensions.join(',');
60
62
  class InnetJS {
@@ -383,7 +385,13 @@ class InnetJS {
383
385
  treeshake: false,
384
386
  output: {
385
387
  dir: releaseFolder,
386
- entryFileNames: `[name]${ext}`,
388
+ entryFileNames: ({ name, facadeModuleId }) => {
389
+ if (REG_TJSX.test(facadeModuleId)) {
390
+ return `${name}${ext}`;
391
+ }
392
+ const match = facadeModuleId.match(REG_EXT);
393
+ return match ? `${name}${match[0]}${ext}` : `${name}${ext}`;
394
+ },
387
395
  format,
388
396
  preserveModules: true,
389
397
  exports: 'named',
@@ -412,7 +420,6 @@ class InnetJS {
412
420
  modules: cssModules,
413
421
  minimize: true,
414
422
  autoModules: true,
415
- dts: true,
416
423
  }),
417
424
  nodeResolve(),
418
425
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.2.17",
3
+ "version": "2.2.19",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",
@@ -82,7 +82,7 @@
82
82
  "rollup-plugin-string": "^3.0.0",
83
83
  "rollup-plugin-styles": "^4.0.0",
84
84
  "rollup-plugin-terser": "^7.0.2",
85
- "rollup-plugin-typescript2": "^0.34.1",
85
+ "rollup-plugin-typescript2": "^0.33.0",
86
86
  "sass": "^1.55.0",
87
87
  "tmp": "^0.2.1",
88
88
  "typescript": "^4.8.4",