diff --git a/.github/workflows/jest_tests.yml b/.github/workflows/jest_tests.yml index d92e5dc0..c20970fd 100644 --- a/.github/workflows/jest_tests.yml +++ b/.github/workflows/jest_tests.yml @@ -20,9 +20,9 @@ jobs: BUILD_ID: ${{ steps.build_id.outputs.id }} - uses: actions/checkout@v2 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 24.x registry-url: https://registry.npmjs.org/ scope: '@mat-github-ci' env: diff --git a/.github/workflows/publish-npm-manual.yml b/.github/workflows/publish-npm-manual.yml index beac56be..c61e7d6c 100644 --- a/.github/workflows/publish-npm-manual.yml +++ b/.github/workflows/publish-npm-manual.yml @@ -27,11 +27,11 @@ jobs: uses: actions/setup-python@v1 with: python-version: 3.7 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} with: - node-version: '12.x' + node-version: '24.x' registry-url: https://registry.npmjs.org/ scope: '@mat-github-ci' - name: Install dependencies diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index f87def1a..f26828f6 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -15,16 +15,16 @@ jobs: uses: actions/setup-python@v1 with: python-version: 3.11 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} with: - node-version: '18' + node-version: '24.x' registry-url: https://registry.npmjs.org/ scope: '@mat-github-ci' - name: Install dependencies run: | - npm install --legacy-peer-deps + npm install ci - name: Build project run: | npm run build-publish diff --git a/.gitignore b/.gitignore index 73b85015..00cbf1c3 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,6 @@ archive/ # Assets used for local development only src/assets/fonts src/assets/styles.css -src/assets/fonts.css \ No newline at end of file +src/assets/fonts.css + +.parcel-cache/ \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..a45fd52c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/.storybook/main.js b/.storybook/main.js index 187ca42e..684854e2 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,14 +1,18 @@ module.exports = { - stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], + stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], + addons: [ '@storybook/addon-links', + '@storybook/addon-webpack5-compiler-babel', '@storybook/addon-essentials', - '@storybook/addon-interactions' + '@storybook/addon-docs' ], - framework: '@storybook/react', - core: { - builder: '@storybook/builder-webpack5' + + framework: { + name: '@storybook/react-webpack5', + options: {} }, + webpackFinal: async (config) => { config.module.rules.push({ test: /\.less$/, diff --git a/.storybook/preview.js b/.storybook/preview.js index e301b05f..4a040c87 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,6 +1,6 @@ import '../node_modules/bulma/css/bulma.min.css'; import '../src/styles.less'; -import '../src/assets/fonts.css'; +// import '../src/assets/fonts.css'; import '../src//stories/stories.css'; export const parameters = { @@ -46,3 +46,4 @@ export const parameters = { } } }; +export const tags = ['autodocs']; diff --git a/Dockerfile b/Dockerfile index 14543a9e..8049ace7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:12.14.1 +FROM node:24 # Setup the working directory RUN mkdir /srv/github-actions-app WORKDIR /srv/github-actions-app diff --git a/README.md b/README.md index 481f07d3..4f3dc1fe 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,18 @@ Clone the mp-react-components repo: git clone git@github.com:materialsproject/mp-react-components.git ``` -Ensure you're using Node.js version 12.x for compatibility. +This project targets Node.js v24 (see `.nvmrc`). Node 20+ is the minimum supported version. If you don't have nvm (Node Version Manager) installed, you can install it using the following command: ``` curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash ``` -Install and use Node.js version 12.x. +Install and use the version pinned in `.nvmrc`: ``` -nvm install 18 -nvm use 18 +nvm install 24 +nvm use ``` To check Node.js version diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 1f3f8801..00000000 --- a/babel.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { presets: ['@babel/preset-env'] }; diff --git a/demo/index.html b/demo/index.html index 2468502e..9976d4e9 100644 --- a/demo/index.html +++ b/demo/index.html @@ -16,6 +16,6 @@
- +