Skip to content

Drop support for Node versions less than 16.20.2 #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
{
"presets": [
["@babel/preset-env", {
"targets": {"node": "10.13.0"}
"targets": {"node": "16.20.2"}
}]
],
"plugins": [
["@babel/plugin-proposal-class-properties", {"loose": true}],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this @babel/plugin-proposal-class-properties was necessary after all and its removal caused the error you were seeing @dcsaszar. Maybe we should be using https://babeljs.io/docs/babel-plugin-proposal-decorators instead with some option that makes sense?

I'm not too familiar with the view code that uses these decorators. But we'd need to resolve that problem before I can release a new major version.

Copy link
Member Author

@valscion valscion May 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mobx integration that is used in different places in the UI code seem to rely on decorators. I'm not too familiar with them but they probably need some looking into to make this library still work.

@observable.ref allChunks;
@observable.shallow selectedChunks;
@observable searchQuery = '';
@observable defaultSize;
@observable selectedSize;
@observable showConcatenatedModulesContent = (localStorage.getItem('showConcatenatedModulesContent') === true);

@observer
export default class ModulesTreemap extends Component {

@computed get sizeSwitchItems() {

@computed get activeSizeItem() {

@computed get highlightedModules() {

@computed get foundModulesInfo() {

["@babel/plugin-proposal-private-methods", {"loose": true}]
]
}
22 changes: 15 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,35 @@ on:
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
node: [10.x, 12.x, 14.x, 16.x]
runs-on: ubuntu-latest
name: Tests on Node.js v${{ matrix.node }}
node:
- version: 16.x
# - version: 18.x
# env: NODE_OPTIONS=--openssl-legacy-provider
- version: 20.x
env: NODE_OPTIONS=--openssl-legacy-provider
- version: 22.x
env: NODE_OPTIONS=--openssl-legacy-provider
runs-on: ubuntu-22.04
name: Tests on Node.js v${{ matrix.node.version }}
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node.version }}

- name: Download deps
uses: bahmutov/npm-install@v1

- name: Build sources
run: npm run build
run: ${{ matrix.node.env }} npm run build

- name: Run tests
run: npm run test
run: ${{ matrix.node.env }} npm run test

lint:
runs-on: ubuntu-latest
Expand All @@ -38,7 +46,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "14.x"
node-version: "22.x"

- name: Download deps
uses: bahmutov/npm-install@v1
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.14.0
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ _Note: Gaps between patch versions are faulty, broken or test releases._

## UNRELEASED

* **Breaking Change**
* Remove explicit support for Node versions below 16.20.2 ([#650](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/650) by [@valscion](https://github.com/valscion))
* **NOTE:** `webpack-bundle-analyzer` might still support older Node versions but they are no longer tested against.

* **Improvement**
* Parse bundles as ES modules based on stats JSON information ([#649](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/649) by [@eamodio](https://github.com/eamodio))

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ To get more information about it you can read [issue #147](https://github.com/we
[node]: https://img.shields.io/node/v/webpack-bundle-analyzer.svg
[node-url]: https://nodejs.org

[tests]: http://img.shields.io/travis/webpack-contrib/webpack-bundle-analyzer.svg
[tests-url]: https://travis-ci.org/webpack-contrib/webpack-bundle-analyzer
[tests]: https://github.com/webpack-contrib/webpack-bundle-analyzer/actions/workflows/main.yml/badge.svg
[tests-url]: https://github.com/webpack-contrib/webpack-bundle-analyzer/actions/workflows/main.yml

[downloads]: https://img.shields.io/npm/dt/webpack-bundle-analyzer.svg
[downloads-url]: https://npmjs.com/package/webpack-bundle-analyzer
Expand Down
Loading