@nx/webpack 21.4.0 → 21.4.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.
package/migrations.json CHANGED
@@ -57,6 +57,15 @@
57
57
  "alwaysAddToPackageJson": false
58
58
  }
59
59
  }
60
+ },
61
+ "21.5.0": {
62
+ "version": "21.5.0-beta.0",
63
+ "packages": {
64
+ "webpack": {
65
+ "version": "5.101.3",
66
+ "alwaysAddToPackageJson": false
67
+ }
68
+ }
60
69
  }
61
70
  }
62
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/webpack",
3
- "version": "21.4.0",
3
+ "version": "21.4.1",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.",
6
6
  "repository": {
@@ -58,17 +58,17 @@
58
58
  "style-loader": "^3.3.0",
59
59
  "terser-webpack-plugin": "^5.3.3",
60
60
  "ts-loader": "^9.3.1",
61
- "tsconfig-paths-webpack-plugin": "4.0.0",
61
+ "tsconfig-paths-webpack-plugin": "4.2.0",
62
62
  "tslib": "^2.3.0",
63
- "webpack": "~5.99.0",
63
+ "webpack": "^5.101.3",
64
64
  "webpack-dev-server": "^5.2.1",
65
65
  "webpack-node-externals": "^3.0.0",
66
66
  "webpack-subresource-integrity": "^5.1.0",
67
- "@nx/devkit": "21.4.0",
68
- "@nx/js": "21.4.0"
67
+ "@nx/devkit": "21.4.1",
68
+ "@nx/js": "21.4.1"
69
69
  },
70
70
  "devDependencies": {
71
- "nx": "21.4.0"
71
+ "nx": "21.4.1"
72
72
  },
73
73
  "publishConfig": {
74
74
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"postcss-cli-resources.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/utils/webpack/plugins/postcss-cli-resources.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAaxC,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAgBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;EA4JtE"}
1
+ {"version":3,"file":"postcss-cli-resources.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/utils/webpack/plugins/postcss-cli-resources.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAaxC,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAgBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;EA8JtE"}
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostcssCliResources = PostcssCliResources;
4
4
  const loader_utils_1 = require("loader-utils");
5
5
  const path = require("path");
6
- const url = require("node:url");
7
6
  function wrapUrl(url) {
8
7
  let wrappedUrl;
9
8
  const hasSingleQuotes = url.indexOf("'") >= 0;
@@ -67,7 +66,9 @@ function PostcssCliResources(options) {
67
66
  resourceCache.set(cacheKey, outputUrl);
68
67
  return outputUrl;
69
68
  }
70
- const { pathname, hash, search } = url.parse(inputUrl.replace(/\\/g, '/'));
69
+ const normalizedUrl = inputUrl.replace(/\\/g, '/');
70
+ const parsedUrl = new URL(normalizedUrl, 'file:///');
71
+ const { pathname, hash, search } = parsedUrl;
71
72
  const resolver = (file, base) => new Promise((resolve, reject) => {
72
73
  loader.resolve(base, decodeURI(file), (err, result) => {
73
74
  if (err) {
@@ -92,11 +93,11 @@ function PostcssCliResources(options) {
92
93
  loader.emitFile(outputPath, content, undefined);
93
94
  let outputUrl = outputPath.replace(/\\/g, '/');
94
95
  if (hash || search) {
95
- outputUrl = url.format({ pathname: outputUrl, hash, search });
96
+ outputUrl = outputUrl + (search || '') + (hash || '');
96
97
  }
97
98
  const loaderOptions = loader.loaders[loader.loaderIndex].options;
98
99
  if (deployUrl && loaderOptions.ident !== 'extracted') {
99
- outputUrl = url.resolve(deployUrl, outputUrl);
100
+ outputUrl = new URL(outputUrl, deployUrl).href;
100
101
  }
101
102
  resourceCache.set(cacheKey, outputUrl);
102
103
  resolve(outputUrl);