Skip to content

Commit

Permalink
Version 8.0 (#581)
Browse files Browse the repository at this point in the history
* chore: upgrade Node and all minor dependencies

* chore: specify travis distrubution

* chore: upgrade webpack and loaders

* doc: simplify migration documentation

* chore: remove unneeded file

* docs: add optional release notes section to the pull request template

* docs: correct typo
  • Loading branch information
mwislek authored Dec 12, 2022
1 parent a6cf16f commit c3c21d5
Show file tree
Hide file tree
Showing 9 changed files with 3,491 additions and 3,449 deletions.
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<!-- Include description and link to resolved issue(s) here. -->

## Release Notes
<!-- Optional description of the resolve issue(s) that will be included in the -->
<!-- Github release description of this library. -->

## Author Checklist

- [ ] Add unit test(s)
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.2
v18.12.1
3 changes: 3 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
core: {
builder: 'webpack5',
},
stories: ['../**/*.story.js'],
addons: [
'@storybook/addon-actions',
Expand Down
13 changes: 12 additions & 1 deletion .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ module.exports = async ({ config }) => {
// Storysource-addon
config.module.rules.push({
test: /\.story\.jsx?$/,
loaders: [require.resolve('@storybook/source-loader')],
use: [
{
loader: require.resolve('@storybook/source-loader')
}
],
enforce: 'pre',
})
// Sass
Expand Down Expand Up @@ -39,5 +43,12 @@ module.exports = async ({ config }) => {
src: path.resolve(__dirname, '../src'),
},
}
// Required for Node ^18.12.1 to resolve an OpenSSL configuration deprecation.
// See: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported/73465262#73465262
config.output = {
...config.output,
hashFunction: 'xxhash64',
}

return config
}
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: node_js
dist: focal
cache: yarn
before_script:
- 'yarn lint --max-warnings=0'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Documentation and usage info can be found in [docs.md](docs.md).
- [v5.0.0](migration-guides/v5.0.0.md)
- [v6.0.0](migration-guides/v6.0.0.md)
- [v7.0.0](migration-guides/v7.0.0.md)
- [v8.0.0](migration-guides/v8.0.0.md)

## Contribution

Expand Down
19 changes: 19 additions & 0 deletions migration-guides/v8.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# v8.0.0 Migration Guide

This version contains the following breaking changes:

1. Upgraded Node version to 18.12.1

Further explanation of each item is detailed below.

---

## 1. Upgraded Node version to 18.12.1

Typically, the Node version of an application can be updated without any breaking change. However, Node 18 requires an upgraded version of `glibc`. This has impact on Travis.

The default distribution used for Travis builds and test execution (`xenial`) does not have the version of `glibc` required by Node 18. See this [Travis community forum note](https://travis-ci.community/t/the-command-npm-config-set-spin-false-failed-and-exited-with-1-during/12909) for a discussion of this issue. See this [Node issue](https://github.com/nodejs/node/issues/42351#issuecomment-1068424442) for a discussion of the new `glibc` version requirement.

To resolve this issue, a specific Linux distribution (`focal`) is specified in the `.travis.yml` configuration file. This distribution has the correct `glibc` version. See [this Travis documentation](https://docs.travis-ci.com/user/reference/focal/) for a description of the `focal` build environment.

This version of `lp-components` will not support older Node versions. You must use Node version ^18.12.1.
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@launchpadlab/lp-components",
"version": "7.0.2",
"version": "8.0.0",
"engines": {
"node": "^14.19 || ^16.14"
"node": "^18.12"
},
"description": "Our Components",
"main": "lib/index.js",
Expand All @@ -20,7 +20,7 @@
"build": "yarn build:cjs && yarn build:esm && yarn build:styles",
"build:cjs": "babel src --out-dir lib",
"build:esm": "BABEL_ENV=esm babel src --out-dir esm",
"build:styles": "cp -r src/styles lib/styles && node-sass src/styles/ -o lib/styles",
"build:styles": "cp -r src/styles lib/styles && sass src/styles:lib/styles",
"build:development": "BABEL_ENV=esm babel src --watch --out-dir esm",
"clean": "rm -rf lib esm",
"docs": "documentation build src/index.js -f md -o docs.md",
Expand Down Expand Up @@ -67,31 +67,33 @@
"@storybook/addon-storysource": "^6.4.22",
"@storybook/addon-viewport": "^6.4.22",
"@storybook/addons": "^6.4.22",
"@storybook/builder-webpack5": "^6.5.14",
"@storybook/manager-webpack5": "^6.5.14",
"@storybook/react": "^6.4.22",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"babel-loader": "^8.2.4",
"babel-loader": "^9.1.0",
"bourbon": "^7.2.0",
"bourbon-neat": "^4.0.0",
"core-js": "^3.21.1",
"css-loader": "^5.2.7",
"css-loader": "^6.7.2",
"documentation": "^13.2.5",
"enzyme": "^3.2.0",
"eslint": "^7.32.0",
"husky": "^7.0.4",
"jest": "^25.1.0",
"jest-canvas-mock": "^2.1.1",
"lint-staged": "^13.0.3",
"node-sass": "^6.0.1",
"prettier": "^2.7.1",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"recompose": "^0.30.0",
"redux": "^4.1.2",
"regenerator-runtime": "^0.13.9",
"sass-loader": "^10.2.1",
"sass": "^1.56.1",
"sass-loader": "^13.2.0",
"size-limit": "^7.0.8",
"style-loader": "^2.0.0",
"webpack": "^4.39.2"
"style-loader": "^3.3.1",
"webpack": "^5.75.0"
},
"peerDependencies": {
"react": "^16.14.0 || ^17.0.0"
Expand Down
Loading

0 comments on commit c3c21d5

Please sign in to comment.