@patternslib/dev 3.5.3 → 3.6.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/.github/workflows/test.yml +3 -3
- package/CHANGES.md +59 -0
- package/babel.config.js +0 -1
- package/package.json +21 -21
- package/webpack/style-inserter.js +12 -0
- package/webpack/webpack-helpers.js +4 -13
- package/webpack/webpack.config.js +2 -3
|
@@ -11,9 +11,9 @@ jobs:
|
|
|
11
11
|
name: test
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
15
|
-
- uses: actions/setup-node@
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
16
|
with:
|
|
17
|
-
node-version: '
|
|
17
|
+
node-version: '20'
|
|
18
18
|
cache: 'yarn'
|
|
19
19
|
- run: make check
|
package/CHANGES.md
CHANGED
|
@@ -2,6 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [3.6.1](https://github.com/patternslib/dev/compare/3.6.0...3.6.1) (2024-08-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
* Webpack style loader. ([ecec3cf](https://github.com/patternslib/dev/commit/ecec3cf5654050c8ec96a924fcaa8bad618d526c))
|
|
12
|
+
|
|
13
|
+
Webpack style loader's insert option needs a different way to reference functions.
|
|
14
|
+
Also deprecate webpack-helpers module.
|
|
15
|
+
|
|
16
|
+
## [3.6.0](https://github.com/patternslib/dev/compare/3.5.3...3.6.0) (2024-08-14)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* Add husky commitlint also to this package. ([1bdcf63](https://github.com/patternslib/dev/commit/1bdcf636324a0a05946754af84faa78c4c7f71f4))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* Add WebP as asset/resource along to the other formats for the Webpack loader. ([58f369c](https://github.com/patternslib/dev/commit/58f369c256eadd3f631f0ea79ed509a93fdfd3d1))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
* Do not upgrade husky and keep at pre 9.x. ([fe89852](https://github.com/patternslib/dev/commit/fe8985223c11cc4258e44e475aeebaa1926ed327))
|
|
33
|
+
|
|
34
|
+
Husky has some breaking changes which we should only upgrade with the next major release of @patternslib/dev.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
* Require minimum node v18.18. ([807147a](https://github.com/patternslib/dev/commit/807147a98527520b7455061629a04ebac6941740))
|
|
38
|
+
|
|
39
|
+
This is Webpack's minimum required version.
|
|
40
|
+
Note: As time of this commit, versions below 18 are unmaintained.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Maintenance
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
* Remove plugin-transform-optional-chaining from babel. ([9facee8](https://github.com/patternslib/dev/commit/9facee8b35a9f09c24c6e466228503d0a257445b))
|
|
48
|
+
|
|
49
|
+
The optional chaining feature is already included in preset-env ES2020.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
* Upgrade dependencies. ([c3d64fd](https://github.com/patternslib/dev/commit/c3d64fdd0c543e199e04088fc661c7bd9315bbe3))
|
|
53
|
+
|
|
54
|
+
Upgrade all except eslint, which needs to migrate from `.eslintrc.js` to
|
|
55
|
+
`eslint.config.js`. This will be done in an upcoming major release.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
* Upgrade GitHub Actions node version. ([4c96faa](https://github.com/patternslib/dev/commit/4c96faa2e34b4fdf50d2d38b6a230704f7d9c7ed))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
* Upgrade GitHub Actions. ([f687bee](https://github.com/patternslib/dev/commit/f687bee3dcd94b50b14fd5df3370aa9ecf245943))
|
|
62
|
+
|
|
63
|
+
|
|
5
64
|
## [3.5.3](https://github.com/patternslib/dev/compare/3.5.2...3.5.3) (2023-11-22)
|
|
6
65
|
|
|
7
66
|
|
package/babel.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternslib/dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "Development base files for working with Patternslib and add-ons.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@babel/core": "^7.
|
|
8
|
-
"@babel/eslint-parser": "^7.
|
|
9
|
-
"@babel/preset-env": "^7.
|
|
10
|
-
"@commitlint/cli": "^
|
|
11
|
-
"@commitlint/config-conventional": "^
|
|
7
|
+
"@babel/core": "^7.25.2",
|
|
8
|
+
"@babel/eslint-parser": "^7.25.1",
|
|
9
|
+
"@babel/preset-env": "^7.25.3",
|
|
10
|
+
"@commitlint/cli": "^19.4.0",
|
|
11
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
12
12
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
13
13
|
"babel-loader": "^9.1.3",
|
|
14
|
-
"css-loader": "^
|
|
15
|
-
"eslint": "^8.
|
|
16
|
-
"eslint-config-prettier": "^9.
|
|
14
|
+
"css-loader": "^7.1.2",
|
|
15
|
+
"eslint": "^8.57.0",
|
|
16
|
+
"eslint-config-prettier": "^9.1.0",
|
|
17
17
|
"husky": "^8.0.3",
|
|
18
18
|
"identity-obj-proxy": "^3.0.0",
|
|
19
19
|
"jest": "^29.7.0",
|
|
20
20
|
"jest-environment-jsdom": "^29.7.0",
|
|
21
21
|
"jest-watch-typeahead": "^2.2.2",
|
|
22
|
-
"prettier": "^3.
|
|
23
|
-
"regenerator-runtime": "^0.14.
|
|
24
|
-
"release-it": "^17.
|
|
25
|
-
"sass": "^1.
|
|
26
|
-
"sass-loader": "^
|
|
27
|
-
"style-loader": "^
|
|
28
|
-
"terser-webpack-plugin": "^5.3.
|
|
22
|
+
"prettier": "^3.3.3",
|
|
23
|
+
"regenerator-runtime": "^0.14.1",
|
|
24
|
+
"release-it": "^17.6.0",
|
|
25
|
+
"sass": "^1.77.8",
|
|
26
|
+
"sass-loader": "^16.0.0",
|
|
27
|
+
"style-loader": "^4.0.0",
|
|
28
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
29
29
|
"timezone-mock": "^1.3.6",
|
|
30
|
-
"webpack": "^5.
|
|
31
|
-
"webpack-bundle-analyzer": "^4.10.
|
|
30
|
+
"webpack": "^5.93.0",
|
|
31
|
+
"webpack-bundle-analyzer": "^4.10.2",
|
|
32
32
|
"webpack-cli": "^5.1.4",
|
|
33
|
-
"webpack-dev-server": "^
|
|
33
|
+
"webpack-dev-server": "^5.0.4",
|
|
34
34
|
"whybundled": "^2.0.0",
|
|
35
|
-
"yarn": "^1.22.
|
|
35
|
+
"yarn": "^1.22.22"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=18.18"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"test": "jest"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function style_inserter(el) {
|
|
2
|
+
// Insert element at the top of <head>
|
|
3
|
+
// Used for injecting CSS via webpack before any other CSS
|
|
4
|
+
var first_child = document.head.querySelectorAll("*")[0];
|
|
5
|
+
if (first_child) {
|
|
6
|
+
document.head.insertBefore(el, first_child);
|
|
7
|
+
} else {
|
|
8
|
+
document.head.append(el);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
module.exports = style_inserter;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// Note:
|
|
5
|
-
// Keep code compatible with IE11 as long as we support it.
|
|
6
|
-
var first_child = document.head.querySelectorAll("*")[0];
|
|
7
|
-
if (first_child) {
|
|
8
|
-
document.head.insertBefore(el, first_child);
|
|
9
|
-
} else {
|
|
10
|
-
document.head.append(el);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
1
|
+
// BBB
|
|
2
|
+
// TODO: Remove in next major version.
|
|
3
|
+
const style_inserter = require("./style-inserter");
|
|
13
4
|
|
|
14
5
|
module.exports = {
|
|
15
|
-
top_head_insert:
|
|
6
|
+
top_head_insert: style_inserter,
|
|
16
7
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
process.traceDeprecation = true;
|
|
2
2
|
const webpack = require("webpack");
|
|
3
|
-
const webpack_helpers = require("./webpack-helpers");
|
|
4
3
|
|
|
5
4
|
// plugins
|
|
6
5
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
@@ -60,7 +59,7 @@ const config_factory = (env, argv, config, babel_include = [], package_json) =>
|
|
|
60
59
|
{
|
|
61
60
|
loader: "style-loader",
|
|
62
61
|
options: {
|
|
63
|
-
insert:
|
|
62
|
+
insert: require.resolve("./style-inserter"),
|
|
64
63
|
},
|
|
65
64
|
},
|
|
66
65
|
"css-loader",
|
|
@@ -72,7 +71,7 @@ const config_factory = (env, argv, config, babel_include = [], package_json) =>
|
|
|
72
71
|
type: "asset/source",
|
|
73
72
|
},
|
|
74
73
|
{
|
|
75
|
-
test: /\.(eot|woff|woff2|ttf|png|jpe?g|gif)$/i,
|
|
74
|
+
test: /\.(eot|woff|woff2|ttf|png|jpe?g|gif|webp)$/i,
|
|
76
75
|
type: "asset/resource",
|
|
77
76
|
},
|
|
78
77
|
],
|