Skip to content
Closed
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
46 changes: 37 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,49 @@ name: Build

on: [ pull_request ]

env:
NODE_ACTIVE_LTS_VERSION: 24
NODE_PREVIOUS_LTS_VERSION: 22
Comment on lines +6 to +7
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

NODE_ACTIVE_LTS_VERSION and NODE_PREVIOUS_LTS_VERSION are set to major versions only (24 and 22), but package.json devEngines requires specific minor versions (^22.11.0 || ^24.11.0). When these values are passed to setup-node, they may install versions like 22.9.0 or 24.0.0 if those are the latest available on the runner. Consider setting these to 22.11 and 24.11 to match the devEngines requirements.

Suggested change
NODE_ACTIVE_LTS_VERSION: 24
NODE_PREVIOUS_LTS_VERSION: 22
NODE_ACTIVE_LTS_VERSION: 24.11
NODE_PREVIOUS_LTS_VERSION: 22.11

Copilot uses AI. Check for mistakes.
NPM_VERSION: 11
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

NPM_VERSION is set to 11, but package.json requires ^11.6.1. While npm install -g npm@11 will install the latest 11.x version (which should satisfy ^11.6.1), for clarity and to ensure the minimum version requirement is met, consider setting this to "^11.6" or "^11.6.1" to match the package.json specification.

Suggested change
NPM_VERSION: 11
NPM_VERSION: ^11.6.1

Copilot uses AI. Check for mistakes.

jobs:
build:
name: Build distribution CSS and JS
build_on_node_previous_lts:
name: Build distribution CSS and JS (Node Previous LTS)
runs-on: ubuntu-24.04
steps:
- name: Clone repository
uses: actions/checkout@v6

- name: Set up Node.js (${{ env.NODE_PREVIOUS_LTS_VERSION }})
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_PREVIOUS_LTS_VERSION }}
cache: npm
continue-on-error: true

- name: Install npm@${{ env.NPM_VERSION }}
run: npm install -g npm@${{ env.NPM_VERSION }}

- name: Print Node.js and npm version
run: node --version && npm --version

- name: Install
run: npm ci

- name: Build
run: npm run build

build_on_node_active_lts:
name: Build distribution CSS and JS (Node Active LTS)
runs-on: ubuntu-24.04
strategy:
matrix:
node: [ 22, 24 ]
steps:
- name: Clone repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
- name: Set up Node.js (${{ env.NODE_ACTIVE_LTS_VERSION }})
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
node-version: ${{ env.NODE_ACTIVE_LTS_VERSION }}
cache: npm

- name: Print Node.js and npm version
Expand Down
14 changes: 13 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@
"url": "https://github.com/react-ui-org/react-ui"
},
"engines": {
"node": ">=22"
"node": ">=22.11.0"
},
"devEngines": {
"runtime": {
"name": "node",
"version": "22.x || 24.x",
"version": "^22.11.0 || ^24.11.0",
Comment on lines +32 to +37
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

There's an inconsistency between engines.node and devEngines.runtime.version. The engines field allows Node.js >=22.11.0 (including 23.x, 25.x, etc.), while devEngines restricts to only ^22.11.0 || ^24.11.0 (which excludes 23.x, 25.x). This means engines would pass but devEngines would fail with an error for versions like 23.x or 25.x.

Consider either:

  1. Aligning devEngines to match engines by using >=22.11.0 <25.0.0 (if 24.x is the max supported), or
  2. Tightening engines to match the actual supported versions if only 22.x and 24.x LTS lines are intended to be supported.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We want to have strictly tight dev environment, but we do not want to tight end-users.

"onFail": "error"
},
"packageManager": {
"name": "npm",
"version": "^11.6.1",
"onFail": "error"
}
},
Expand Down
Loading