weboptimizer 4.0.57 → 4.0.58
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/configurator.js +5 -5
- package/package.json +6 -6
package/configurator.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
// region imports
|
|
19
19
|
import { convertCircularObjectToJSON, copy, evaluateAsyncDynamicData, evaluateDynamicData, extend, getUTCTimestamp, importFilesystemAPI, isFileSync, isObject, isPlainObject, Logger, MAXIMAL_NUMBER_OF_ITERATIONS, modifyObject, optionalImport, parseEncodedObject, removeKeyPrefixes, UTILITY_SCOPE } from 'clientnode';
|
|
20
|
-
import fileSystem, {
|
|
20
|
+
import fileSystem, { lstat, readFile, unlink } from 'fs/promises';
|
|
21
21
|
import path, { basename, dirname, join, resolve } from 'path';
|
|
22
22
|
import { determineAssetType, determineModuleFilePath, determineModuleLocations, resolveAutoInjection, resolveBuildConfigurationFilePaths, resolveModulesInFolders, normalizeGivenInjection, normalizePaths } from "./helper.js";
|
|
23
23
|
import packageConfiguration from './package.json' with { type: 'json' };
|
|
@@ -79,7 +79,7 @@ environment = eval('process.env')) => {
|
|
|
79
79
|
hierarchy.
|
|
80
80
|
*/
|
|
81
81
|
try {
|
|
82
|
-
if (
|
|
82
|
+
if ((await lstat(join(currentWorkingDirectory, 'node_modules'))).isSymbolicLink()) metaConfiguration.default.path.context = currentWorkingDirectory;
|
|
83
83
|
} catch {
|
|
84
84
|
// Continue regardless of error.
|
|
85
85
|
}
|
|
@@ -143,11 +143,11 @@ environment = eval('process.env')) => {
|
|
|
143
143
|
givenCommandLineArguments: commandLineArguments
|
|
144
144
|
};
|
|
145
145
|
if (filePath) {
|
|
146
|
-
const fileContent =
|
|
146
|
+
const fileContent = await readFile(filePath, {
|
|
147
147
|
encoding: configuration.encoding
|
|
148
148
|
});
|
|
149
149
|
runtimeInformation = JSON.parse(fileContent);
|
|
150
|
-
|
|
150
|
+
await unlink(filePath);
|
|
151
151
|
}
|
|
152
152
|
//// region task specific configuration
|
|
153
153
|
///// region apply task type specific configuration
|
|
@@ -165,7 +165,7 @@ environment = eval('process.env')) => {
|
|
|
165
165
|
if (Object.prototype.hasOwnProperty.call(result, '__reference__')) {
|
|
166
166
|
const referenceNames = [].concat(result.__reference__);
|
|
167
167
|
delete result.__reference__;
|
|
168
|
-
for (const name of referenceNames) if (Object.prototype.hasOwnProperty.call(configuration, name)) extend(true, result, configuration[name]);else if (isFileSync(name)) extend(true, result, JSON.parse(
|
|
168
|
+
for (const name of referenceNames) if (Object.prototype.hasOwnProperty.call(configuration, name)) extend(true, result, configuration[name]);else if (isFileSync(name)) extend(true, result, JSON.parse(await readFile(name, configuration.encoding)));else log.warn(`Given dynamic referenced configuration "${name}"`, 'could not be resolved.');
|
|
169
169
|
}
|
|
170
170
|
extend(true, modifyObject(configuration, result), result);
|
|
171
171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.58",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"babel-loader": "^10.1.1",
|
|
103
103
|
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
|
104
104
|
"babel-plugin-transform-rewrite-imports": "^1.5.4",
|
|
105
|
-
"clientnode": "4.0.
|
|
105
|
+
"clientnode": "4.0.1489",
|
|
106
106
|
"core-js": "^3.50.0",
|
|
107
107
|
"ejs": "^6.0.1",
|
|
108
108
|
"exports-loader": "^5.0.0",
|
|
@@ -130,15 +130,15 @@
|
|
|
130
130
|
"@types/html-minifier": "^4.0.6",
|
|
131
131
|
"@types/html-minifier-terser": "^7.0.2",
|
|
132
132
|
"@types/imagemin": "^9.0.1",
|
|
133
|
-
"@types/node": "^26.
|
|
133
|
+
"@types/node": "^26.3.0",
|
|
134
134
|
"@types/postcss-import": "^14.0.3",
|
|
135
135
|
"@types/postcss-url": "^10.0.4",
|
|
136
136
|
"@types/webpack-env": "^1.18.8",
|
|
137
137
|
"@types/webpack-sources": "^3.2.3",
|
|
138
|
-
"@typescript-eslint/parser": "^8.
|
|
138
|
+
"@typescript-eslint/parser": "^8.68.0",
|
|
139
139
|
"css-loader": "^7.1.4",
|
|
140
140
|
"cssnano": "^8.0.8",
|
|
141
|
-
"eslint": "^10.9.
|
|
141
|
+
"eslint": "^10.9.1",
|
|
142
142
|
"eslint-config-google": "^0.14.0",
|
|
143
143
|
"eslint-plugin-jsdoc": "^64.2.1",
|
|
144
144
|
"favicons": "^7.3.1",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"stylelint-config-standard": "^40.0.0",
|
|
164
164
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
165
165
|
"terser-webpack-plugin": "^5.6.1",
|
|
166
|
-
"typescript-eslint": "^8.
|
|
166
|
+
"typescript-eslint": "^8.68.0",
|
|
167
167
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
168
168
|
"web-documentation": "^1.0.49",
|
|
169
169
|
"workbox-webpack-plugin": "^7.4.1"
|