@patternslib/dev 3.4.0 → 3.5.0

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/CHANGES.md CHANGED
@@ -2,24 +2,47 @@
2
2
 
3
3
 
4
4
 
5
- ## [3.4.0](https://github.com/patternslib/dev/compare/3.3.5...3.4.0) (2023-07-27)
5
+ ## [3.5.0](https://github.com/patternslib/dev/compare/3.4.1...3.5.0) (2023-08-30)
6
6
 
7
7
 
8
- ### Maintenance
8
+ ### Features
9
9
 
10
10
 
11
- * Depend on the minimum actively maintained Node.js version >= 16. ([603a024](https://github.com/patternslib/dev/commit/603a024f1962d7731d8aa09457c90c48c73f2302))
11
+ * **Tests:** Add helper for conditional test skipping and node version parsing. ([611b77b](https://github.com/patternslib/dev/commit/611b77b2b4469226ebcf942e5b68851e7927c630))
12
12
 
13
13
 
14
- * Upgrade dependencies. ([b3bb92f](https://github.com/patternslib/dev/commit/b3bb92f0e78c723fb20950e0a47404d9fd2f47af))
15
14
 
16
- ## [3.3.5](https://github.com/patternslib/dev/compare/3.3.4...3.3.5) (2023-05-29)
15
+ ### Maintenance
16
+
17
+
18
+ * Upgrade dependencies. ([1e146a9](https://github.com/patternslib/dev/commit/1e146a99047786ffbf69cc0da97763885af3736f))
19
+
20
+ ## [3.4.1](https://github.com/patternslib/dev/compare/3.4.0...3.4.1) (2023-08-11)
17
21
 
18
22
 
19
23
  ### Bug Fixes
20
24
 
21
25
 
22
- * Fix hook config from 3.3.4. ([b4f02f6](https://github.com/patternslib/dev/commit/b4f02f69fda38b8c6a0ef8402511fc8cd87eff9d))
26
+ * Correct comment in Makefile. ([5fb33c6](https://github.com/patternslib/dev/commit/5fb33c6f94464c8df5678556197bac4692d6b878))
27
+
28
+
29
+
30
+ ### Maintenance
31
+
32
+
33
+ * Upgrade dependencies. ([4fcf179](https://github.com/patternslib/dev/commit/4fcf1791317ad8bc6b06cc1406eeb5672c3e2a4d))
34
+
35
+ ## [3.4.0](https://github.com/patternslib/dev/compare/3.3.5...3.4.0) (2023-07-27)
36
+
37
+
38
+ ### Maintenance
39
+
40
+
41
+ * Depend on the minimum actively maintained Node.js version >= 16. ([603a024](https://github.com/patternslib/dev/commit/603a024f1962d7731d8aa09457c90c48c73f2302))
42
+
43
+
44
+ * Upgrade dependencies. ([b3bb92f](https://github.com/patternslib/dev/commit/b3bb92f0e78c723fb20950e0a47404d9fd2f47af))
45
+
23
46
 
24
47
  ## [3.3.5](https://github.com/patternslib/dev/compare/3.3.4...3.3.5) (2023-05-29)
25
48
 
@@ -29,6 +52,7 @@
29
52
 
30
53
  * Fix hook config from 3.3.4. ([b4f02f6](https://github.com/patternslib/dev/commit/b4f02f69fda38b8c6a0ef8402511fc8cd87eff9d))
31
54
 
55
+
32
56
  ## [3.3.4](https://github.com/patternslib/dev/compare/3.3.3...3.3.4) (2023-05-29)
33
57
 
34
58
 
package/Makefile CHANGED
@@ -56,7 +56,7 @@ bundle-pre:
56
56
 
57
57
  # Compile the bundle.
58
58
  # NOTE: When using the normal workflow - e.g. `make release-minor`, the
59
- # relase-it config runs `make build` after the version bump.
59
+ # relase-it config runs `make bundle` after the version bump.
60
60
  .PHONY: bundle
61
61
  bundle: clean-dist bundle-pre stamp-yarn
62
62
  ifneq "$(PACKAGE_NAME)" "$(PACKAGE_DEV)"
@@ -1,6 +1,44 @@
1
1
  // need this for async/await in tests
2
2
  import "regenerator-runtime/runtime";
3
3
 
4
+ /**
5
+ * Return the node version.
6
+ *
7
+ * See: https://stackoverflow.com/a/20798760/1337474
8
+ *
9
+ * @returns {object} - The node version. { version, major, minor, patch }
10
+ *
11
+ * @example
12
+ * global.node_version().major >= 19 // true if node version is >= 19
13
+ * global.node_version().version // "v14.17.0"
14
+ */
15
+ global.node_version = () => {
16
+ const parsed_version = process.version.match(/^v(\d+)\.(\d+)\.(\d+)/);
17
+ console.log(parsed_version);
18
+ return {
19
+ version: parsed_version[0],
20
+ major: parseInt(parsed_version[1]),
21
+ minor: parseInt(parsed_version[2]),
22
+ patch: parseInt(parsed_version[3]),
23
+ };
24
+ };
25
+
26
+ /**
27
+ * Conditional Jest tests
28
+ *
29
+ * See: https://stackoverflow.com/a/60438234/1337474
30
+ *
31
+ * @param {boolean} condition - The condition to test.
32
+ * @returns {function} - it or it.skip
33
+ *
34
+ * @example
35
+ *
36
+ * global.itif(global.node_version().major >= 19)("should do something", () => {
37
+ * // test code
38
+ * });
39
+ */
40
+ global.itif = (condition) => (condition ? it : it.skip);
41
+
4
42
  // pat-fullscreen
5
43
  document.requestFullscreen = jest.fn();
6
44
  document.exitFullscreen = jest.fn();
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "name": "@patternslib/dev",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Development base files for working with Patternslib and add-ons.",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
- "@babel/core": "^7.22.9",
8
- "@babel/eslint-parser": "^7.22.9",
9
- "@babel/preset-env": "^7.22.9",
10
- "@commitlint/cli": "^17.6.7",
11
- "@commitlint/config-conventional": "^17.6.7",
7
+ "@babel/core": "^7.22.11",
8
+ "@babel/eslint-parser": "^7.22.11",
9
+ "@babel/preset-env": "^7.22.10",
10
+ "@commitlint/cli": "^17.7.1",
11
+ "@commitlint/config-conventional": "^17.7.0",
12
12
  "@release-it/conventional-changelog": "^7.0.0",
13
13
  "babel-loader": "^9.1.3",
14
14
  "css-loader": "^6.8.1",
15
- "eslint": "^8.45.0",
16
- "eslint-config-prettier": "^8.9.0",
15
+ "eslint": "^8.48.0",
16
+ "eslint-config-prettier": "^9.0.0",
17
17
  "husky": "^8.0.3",
18
18
  "identity-obj-proxy": "^3.0.0",
19
- "jest": "^29.6.2",
20
- "jest-environment-jsdom": "^29.6.2",
19
+ "jest": "^29.6.4",
20
+ "jest-environment-jsdom": "^29.6.4",
21
21
  "jest-watch-typeahead": "^2.2.2",
22
- "prettier": "^3.0.0",
23
- "regenerator-runtime": "^0.13.11",
24
- "release-it": "^16.1.3",
25
- "sass": "^1.64.1",
22
+ "prettier": "^3.0.3",
23
+ "regenerator-runtime": "^0.14.0",
24
+ "release-it": "^16.1.5",
25
+ "sass": "^1.66.1",
26
26
  "sass-loader": "^13.3.2",
27
27
  "style-loader": "^3.3.3",
28
28
  "terser-webpack-plugin": "^5.3.9",