@oroinc/oro-webpack-config-builder 6.1.0-lts15 → 7.0.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.
@@ -2,54 +2,11 @@
2
2
  "name": "inject-loader",
3
3
  "version": "4.0.1",
4
4
  "description": "A Webpack loader for injecting code into modules via their dependencies",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "build": "webpack --config config/webpack.config.js",
8
- "build:test": "webpack --config config/webpack.test.config.js",
9
- "build:release": "yarn run build && mkdir -p ./dist && cp -f ./tmp/index.js ./dist/index.js && cp -f ./tmp/index.js.map ./dist/index.js.map",
10
- "pretest:unit": "yarn build && yarn build:test",
11
- "test:unit": "mocha tmp/testBundle.js --require source-map-support/register",
12
- "test:integration": "./script/integration_test",
13
- "test": "flow && yarn test:unit && yarn test:integration",
14
- "precommit": "pretty-quick --staged"
15
- },
16
- "files": [
17
- "*.md",
18
- "dist"
19
- ],
20
5
  "author": "Justin Morris <desk@pixelbloom.com> (http://pixelbloom.com)",
21
6
  "repository": {
22
7
  "type": "git",
23
8
  "url": "git@github.com:plasticine/inject-loader.git"
24
9
  },
25
10
  "license": "MIT",
26
- "dependencies": {
27
- "babel-core": "~6"
28
- },
29
- "devDependencies": {
30
- "babel-loader": "^7.1.4",
31
- "babel-plugin-add-module-exports": "^0.2.1",
32
- "babel-plugin-transform-flow-strip-types": "^6.22.0",
33
- "babel-preset-es2015": "^6.22.0",
34
- "flow-bin": "^0.69.0",
35
- "husky": "^0.14.3",
36
- "mocha": "^5.0.5",
37
- "prettier": "^1.11.1",
38
- "pretty-quick": "^1.4.1",
39
- "source-map-support": "^0.5.4",
40
- "webpack": "^4.35.0",
41
- "webpack-cli": "^3.3.5"
42
- },
43
- "peerDependencies": {
44
- "webpack": "^1 || ^2 || ^3 || ^4"
45
- },
46
- "keywords": [
47
- "webpack",
48
- "testing",
49
- "loader",
50
- "webpack-loader",
51
- "inject",
52
- "mock",
53
- "mocking"
54
- ]
11
+ "private": true
55
12
  }
@@ -31,6 +31,8 @@ const ErrorHandler = require('./error-handler');
31
31
  const SVGSprite = require('./svg-sprite');
32
32
  const TerserPlugin = require('terser-webpack-plugin');
33
33
  const jsToSCSS = require('./js-to-scss');
34
+ const oroPostcssCleanup = require('./postcss/oro-postcss-cleanup');
35
+ const cleanupPostcssConfig = require('./postcss/cleanup-postcss-config');
34
36
  require('resolve-url-loader');
35
37
  require('lezer-loader');
36
38
 
@@ -565,7 +567,10 @@ class ConfigBuilder {
565
567
  sourceMap: true,
566
568
  postcssOptions: {
567
569
  plugins: [
568
- require('autoprefixer')
570
+ require('autoprefixer'),
571
+ this._isProduction
572
+ ? oroPostcssCleanup(cleanupPostcssConfig)
573
+ : null
569
574
  ]
570
575
  }
571
576
  }
@@ -612,7 +617,6 @@ class ConfigBuilder {
612
617
 
613
618
  _initialize(args, env) {
614
619
  const entryPointFileWriter = new EntryPointFileWriter(this._publicPath);
615
-
616
620
  this._isProduction = args.mode === 'production';
617
621
  this._symfonyEnv = env.symfony;
618
622
  this._appConfig = AppConfigLoader.getConfig(this._cachePath, this._symfonyEnv);
package/package.json CHANGED
@@ -1,55 +1,57 @@
1
1
  {
2
2
  "name": "@oroinc/oro-webpack-config-builder",
3
- "version": "6.1.0-lts15",
3
+ "version": "7.0.1",
4
4
  "author": "Oro, Inc. (https://oroinc.com)",
5
5
  "license": "MIT",
6
6
  "description": "An integration of OroPlatform based applications with the Webpack.",
7
7
  "main": "oro-webpack-config.js",
8
8
  "dependencies": {
9
- "@babel/core": "~7.23.3",
10
- "@babel/plugin-transform-runtime": "~7.21.0",
11
- "@babel/preset-env": "~7.21.2",
12
- "@swc/core": "^1.11.8",
13
- "autoprefixer": "~10.4.13",
14
- "babel-loader": "~9.1.0",
9
+ "@babel/core": "~7.23.9",
10
+ "@babel/plugin-transform-runtime": "~7.21.4",
11
+ "@babel/preset-env": "~7.21.5",
12
+ "@swc/core": "^1.15.11",
13
+ "autoprefixer": "~10.4.24",
14
+ "babel-loader": "~9.1.3",
15
15
  "bindings": "~1.5.0",
16
- "css-loader": "^6.8.1",
17
- "css-minimizer-webpack-plugin": "~5.0.0",
16
+ "colorette": "^2.0.20",
17
+ "css-loader": "^6.11.0",
18
+ "css-minimizer-webpack-plugin": "~5.0.1",
18
19
  "deepmerge": "~4.3.1",
20
+ "enhanced-resolve": "^5.18.4",
21
+ "esbuild-loader": "^4.4.2",
19
22
  "exports-loader": "~4.0.0",
20
23
  "expose-loader": "~4.1.0",
21
- "esbuild-loader": "^4.3.0",
22
24
  "file-loader": "~6.2.0",
23
- "html-webpack-plugin": "~5.5.0",
25
+ "html-webpack-plugin": "~5.5.4",
24
26
  "imports-loader": "~4.0.1",
25
- "js-yaml": "~4.1.0",
27
+ "js-yaml": "~4.1.1",
26
28
  "lezer-loader": "^0.3.0",
27
- "mini-css-extract-plugin": "~2.7.1",
28
- "minimist": "~1.2.7",
29
+ "mini-css-extract-plugin": "~2.7.7",
30
+ "minimist": "~1.2.8",
29
31
  "nan": "~2.17.0",
30
32
  "path": "0.12.7",
31
- "postcss": "<8.4.33",
33
+ "postcss": "^8.4.32",
32
34
  "postcss-loader": "~7.3.4",
33
- "printf": "~0.6.0",
35
+ "printf": "~0.6.1",
34
36
  "resolve-url-loader": "^5.0.0",
35
- "rtlcss-webpack-plugin": "~4.0.6",
36
- "sass": "~1.85.0",
37
- "sass-loader": "~13.2.0",
38
- "schema-utils": "^4.0.0",
39
- "style-loader": "~3.3.1",
40
- "svgo": "^3.0.2",
37
+ "rtlcss-webpack-plugin": "~4.0.7",
38
+ "sass": "~1.85.1",
39
+ "sass-loader": "~13.2.2",
40
+ "schema-utils": "^4.3.3",
41
+ "style-loader": "~3.3.4",
42
+ "svgo": "^3.3.2",
41
43
  "svgstore": "^3.0.1",
42
- "terser": "~5.39.0",
43
- "terser-webpack-plugin": "^5.3.13",
44
+ "terser": "~5.39.2",
45
+ "terser-webpack-plugin": "^5.3.16",
44
46
  "text-loader": "0.0.1",
45
- "underscore": "1.13.*",
47
+ "underscore": "1.13.7",
46
48
  "url-loader": "~4.1.1",
47
49
  "webpack": "~5.98.0",
48
50
  "webpack-bundle-analyzer": "~4.10.2",
49
- "webpack-cli": "~6.0.0",
50
- "webpack-dev-server": "^5.2.0",
51
+ "webpack-cli": "~6.0.1",
52
+ "webpack-dev-server": "^5.2.3",
51
53
  "webpack-merge": "~5.8.0",
52
- "webpack-subresource-integrity": "^5.2.0-rc.1",
53
- "wildcard": "~2.0.0"
54
+ "webpack-subresource-integrity": "5.2.0-rc.1",
55
+ "wildcard": "~2.0.1"
54
56
  }
55
57
  }
@@ -28,11 +28,11 @@ class IntegrityFilePlugin {
28
28
  ];
29
29
  })
30
30
  );
31
+ const jsonData = JSON.stringify(integrityData, null, 2);
32
+ const outputPath = path.join(this.publicPath, compiler.options.output.publicPath, this.fileName);
31
33
 
32
- compilation.emitAsset(
33
- this.fileName,
34
- new sources.RawSource(JSON.stringify(integrityData, null, 2))
35
- );
34
+ await fs.writeFile(outputPath, jsonData, 'utf8');
35
+ compilation.emitAsset(outputPath, new sources.RawSource(jsonData));
36
36
  }
37
37
  );
38
38
  });
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ declarations: {
3
+ cursor: {
4
+ task: 'remove',
5
+ whenValueEquals: 'hand'
6
+ },
7
+ filter: {
8
+ task: 'remove',
9
+ whenValueEquals: 'gray'
10
+ }
11
+ }
12
+ };
@@ -0,0 +1,29 @@
1
+ module.exports = ({declarations = {}} = {}) => {
2
+ const props = Object.keys(declarations);
3
+
4
+ return {
5
+ postcssPlugin: 'oro-postcss-cleanup',
6
+
7
+ Declaration(decl, {result}) {
8
+ for (let i = 0; i < props.length; i++) {
9
+ const prop = props[i];
10
+ if (decl.prop === prop) {
11
+ declarationParserHelper({declConfig: declarations[prop], decl: decl, result: result});
12
+ break;
13
+ }
14
+ }
15
+ }
16
+ };
17
+
18
+ function declarationParserHelper({declConfig, decl, result}) {
19
+ if (typeof declConfig === 'object' && declConfig.task === 'remove') {
20
+ if (declConfig.whenValueEquals !== undefined && declConfig.whenValueEquals === decl.value) {
21
+ decl.remove();
22
+ }
23
+ } else if (declConfig.task) {
24
+ result.warn(`Unknown task: [${declConfig.task}]`, { node: decl });
25
+ }
26
+ }
27
+ };
28
+
29
+ module.exports.postcss = true;
@@ -4,7 +4,7 @@ class SvgIconsSchemaError extends BaseError {
4
4
  /**
5
5
  * @example
6
6
  * Invalid Theme config: the "theme.yml" files in the "default" theme do not match the API schema.
7
- * has an unknown property 'label'.
7
+ * has an unknown property 'rest'.
8
8
  * at default/theme.yml
9
9
  *
10
10
  * @example