weboptimizer 2.0.1467 → 2.0.1469

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.
package/eslint.config.mjs CHANGED
@@ -1,14 +1,17 @@
1
1
  import clientnode from 'clientnode';
2
2
  import google from 'eslint-config-google';
3
3
  import jsdoc from 'eslint-plugin-jsdoc';
4
+ import { readFile } from 'fs/promises';
4
5
  import globals from 'globals';
5
- import js from '@eslint/js';
6
+ import { resolve } from 'path';
7
+ import { cwd } from 'process';
6
8
  import typescript from 'typescript-eslint';
9
+ import js from '@eslint/js';
7
10
  import typescriptPlugin from '@typescript-eslint/eslint-plugin';
8
11
  import typescriptParser from '@typescript-eslint/parser';
9
- const {
10
- Tools
11
- } = clientnode;
12
+
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ const Tools = clientnode.Tools;
12
15
 
13
16
  // Remove unsupported rules.
14
17
  const unsuportedRules = ['require-jsdoc', 'valid-jsdoc'];
@@ -16,8 +19,11 @@ const googleRules = Object.keys(google.rules).filter(key => !unsuportedRules.inc
16
19
  ...object,
17
20
  [key]: google.rules[key]
18
21
  }), {});
22
+ const isLibrary = JSON.parse(await readFile(resolve(cwd(), './package.json'), {
23
+ encoding: 'utf-8'
24
+ })).default?.webOptimizer?.library ?? false;
19
25
  let tsConfigFilePath = '';
20
- for (const filePath of ['./tsconfig.json', './node_modules/weboptimizer/tsconfig.json']) if (Tools.isFileSync(filePath)) {
26
+ for (const filePath of ['./tsconfig.json', './node_modules/weboptimizer/tsconfig.' + `${isLibrary ? 'library' : 'application'}.json`]) if (await Tools.isFile(filePath)) {
21
27
  tsConfigFilePath = filePath;
22
28
  break;
23
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "2.0.1467",
3
+ "version": "2.0.1469",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -100,7 +100,7 @@
100
100
  "babel-loader": "^9.1.3",
101
101
  "babel-plugin-transform-modern-regexp": "^0.0.6",
102
102
  "babel-preset-minify": "^0.5.2",
103
- "clientnode": "^3.0.1143",
103
+ "clientnode": "3.0.1143",
104
104
  "ejs": "^3.1.10",
105
105
  "exports-loader": "^5.0.0",
106
106
  "extract-loader": "^5.1.0",
package/tsconfig.json CHANGED
@@ -7,6 +7,7 @@
7
7
  "checkJs": true,
8
8
  "esModuleInterop": true,
9
9
  "experimentalDecorators": true,
10
+ "forceConsistentCasingInFileNames": true,
10
11
  "isolatedModules": true,
11
12
  "jsx": "react-jsx",
12
13
  "lib": ["DOM", "ESNext"],