Skip to content

Commit

Permalink
Merge branch 'main' into use-make-features
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki authored Oct 20, 2023
2 parents 3e0ca67 + 1599e34 commit e2a33f4
Show file tree
Hide file tree
Showing 6 changed files with 2,528 additions and 1,693 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '18'
cache: 'yarn'
- run: make check
56 changes: 53 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,63 @@
# Changelog


## [3.5.2](https://github.com/patternslib/dev/compare/3.5.1...3.5.2) (2023-10-16)

## [3.3.5](https://github.com/patternslib/dev/compare/3.3.4...3.3.5) (2023-05-29)

### Maintenance


* Upgrade dependencies. ([e5fb5b8](https://github.com/patternslib/dev/commit/e5fb5b8bb004eb5990d6326fe93d8ed02cbbf362))

## [3.5.1](https://github.com/patternslib/dev/compare/3.5.0...3.5.1) (2023-09-23)


### Maintenance


* Upgrade dependencies. ([b1ffc64](https://github.com/patternslib/dev/commit/b1ffc6453551b7312e4643f4f6aa679286baa379))

## [3.5.0](https://github.com/patternslib/dev/compare/3.4.1...3.5.0) (2023-08-30)


### Features


* **Tests:** Add helper for conditional test skipping and node version parsing. ([611b77b](https://github.com/patternslib/dev/commit/611b77b2b4469226ebcf942e5b68851e7927c630))



### Maintenance


* Upgrade dependencies. ([1e146a9](https://github.com/patternslib/dev/commit/1e146a99047786ffbf69cc0da97763885af3736f))

## [3.4.1](https://github.com/patternslib/dev/compare/3.4.0...3.4.1) (2023-08-11)


### Bug Fixes


* Fix hook config from 3.3.4. ([b4f02f6](https://github.com/patternslib/dev/commit/b4f02f69fda38b8c6a0ef8402511fc8cd87eff9d))
* Correct comment in Makefile. ([5fb33c6](https://github.com/patternslib/dev/commit/5fb33c6f94464c8df5678556197bac4692d6b878))



### Maintenance


* Upgrade dependencies. ([4fcf179](https://github.com/patternslib/dev/commit/4fcf1791317ad8bc6b06cc1406eeb5672c3e2a4d))

## [3.4.0](https://github.com/patternslib/dev/compare/3.3.5...3.4.0) (2023-07-27)


### Maintenance


* Depend on the minimum actively maintained Node.js version >= 16. ([603a024](https://github.com/patternslib/dev/commit/603a024f1962d7731d8aa09457c90c48c73f2302))


* Upgrade dependencies. ([b3bb92f](https://github.com/patternslib/dev/commit/b3bb92f0e78c723fb20950e0a47404d9fd2f47af))


## [3.3.5](https://github.com/patternslib/dev/compare/3.3.4...3.3.5) (2023-05-29)

Expand All @@ -18,6 +67,7 @@

* Fix hook config from 3.3.4. ([b4f02f6](https://github.com/patternslib/dev/commit/b4f02f69fda38b8c6a0ef8402511fc8cd87eff9d))


## [3.3.4](https://github.com/patternslib/dev/compare/3.3.3...3.3.4) (2023-05-29)


Expand Down Expand Up @@ -588,4 +638,4 @@ all dependencies will be installed.

* Initial dev setup, based on @patternslib/patternslib. ([12968fb](https://github.com/patternslib/dev/commit/12968fb0c9ee8d0b858acc88d8d3077a70cfa6d2))

* Upgrade dependencies. ([134295d](https://github.com/patternslib/dev/commit/134295d67fe7c479c73c7878fd1d3ef0a07e5a83))
* Upgrade dependencies. ([134295d](https://github.com/patternslib/dev/commit/134295d67fe7c479c73c7878fd1d3ef0a07e5a83))
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bundle-pre:

# Compile the bundle.
# NOTE: When using the normal workflow - e.g. `make release-minor`, the
# relase-it config runs `make build` after the version bump.
# relase-it config runs `make bundle` after the version bump.
bundle dist/: package.json clean-dist bundle-pre install
ifneq "$(PACKAGE_NAME)" "$(PACKAGE_DEV)"
@# Do not build a bundle for @patternslib/dev
Expand Down
38 changes: 38 additions & 0 deletions jest/setup-tests.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
// need this for async/await in tests
import "regenerator-runtime/runtime";

/**
* Return the node version.
*
* See: https://stackoverflow.com/a/20798760/1337474
*
* @returns {object} - The node version. { version, major, minor, patch }
*
* @example
* global.node_version().major >= 19 // true if node version is >= 19
* global.node_version().version // "v14.17.0"
*/
global.node_version = () => {
const parsed_version = process.version.match(/^v(\d+)\.(\d+)\.(\d+)/);
console.log(parsed_version);
return {
version: parsed_version[0],
major: parseInt(parsed_version[1]),
minor: parseInt(parsed_version[2]),
patch: parseInt(parsed_version[3]),
};
};

/**
* Conditional Jest tests
*
* See: https://stackoverflow.com/a/60438234/1337474
*
* @param {boolean} condition - The condition to test.
* @returns {function} - it or it.skip
*
* @example
*
* global.itif(global.node_version().major >= 19)("should do something", () => {
* // test code
* });
*/
global.itif = (condition) => (condition ? it : it.skip);

// pat-fullscreen
document.requestFullscreen = jest.fn();
document.exitFullscreen = jest.fn();
Expand Down
45 changes: 24 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
{
"name": "@patternslib/dev",
"version": "3.3.5",
"version": "3.5.2",
"description": "Development base files for working with Patternslib and add-ons.",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.22.1",
"@babel/eslint-parser": "^7.21.8",
"@babel/preset-env": "^7.22.4",
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@release-it/conventional-changelog": "^5.1.1",
"babel-loader": "^9.1.2",
"@babel/core": "^7.23.2",
"@babel/eslint-parser": "^7.22.15",
"@babel/preset-env": "^7.23.2",
"@commitlint/cli": "^17.8.0",
"@commitlint/config-conventional": "^17.8.0",
"@release-it/conventional-changelog": "^7.0.2",
"babel-loader": "^9.1.3",
"css-loader": "^6.8.1",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"husky": "^8.0.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-watch-typeahead": "^2.2.2",
"prettier": "^2.8.8",
"regenerator-runtime": "^0.13.11",
"release-it": "^15.10.3",
"sass": "^1.62.1",
"sass-loader": "^13.3.1",
"prettier": "^3.0.3",
"regenerator-runtime": "^0.14.0",
"release-it": "^16.2.1",
"sass": "^1.69.3",
"sass-loader": "^13.3.2",
"style-loader": "^3.3.3",
"terser-webpack-plugin": "^5.3.9",
"timezone-mock": "^1.3.6",
"webpack": "^5.84.1",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.1.1",
"webpack-dev-server": "^4.15.0",
"webpack": "^5.89.0",
"webpack-bundle-analyzer": "^4.9.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"whybundled": "^2.0.0",
"yarn": "^1.22.19"
},
"engines": {
"node": ">=16"
},
"scripts": {
"test": "jest"
},
Expand Down
Loading

0 comments on commit e2a33f4

Please sign in to comment.