Skip to content

Commit ee95a7a

Browse files
authored
Merge branch 'master' into FE-7531
2 parents d9fb9c3 + 58d53f4 commit ee95a7a

File tree

24 files changed

+686
-291
lines changed

24 files changed

+686
-291
lines changed

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
run: npm ci
5050

5151
- name: Run chromatic on branch
52-
run: npx chromatic@latest --project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-once-uploaded --branch-name="${{ needs.check.outputs.branch_name }}" --only-changed true
52+
run: npx chromatic --project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-once-uploaded --branch-name="${{ needs.check.outputs.branch_name }}" --only-changed true

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ jobs:
8383
node-version: ${{ matrix.node }}
8484
cache: npm
8585

86-
- name: Install nyc
87-
run: npm install [email protected] --save-dev
86+
- name: Install dependencies
87+
run: npm ci
8888

8989
- name: Download shard coverage reports
9090
uses: actions/download-artifact@v4

.github/workflows/semantic-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
passphrase: ${{ secrets.GPG_PASSPHRASE }}
3232
git-user-signingkey: true
3333
git-commit-gpgsign: true
34+
- name: Run build
35+
run: npm run build
3436
- run: npx semantic-release
3537
env:
3638
# A personal access token is required to publish from protected branches

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-scripts=true

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## [158.14.2](https://github.com/Sage/carbon/compare/v158.14.1...v158.14.2) (2025-12-08)
2+
3+
### Bug Fixes
4+
5+
* **flat-table:** optimise component to reduce re-renders ([74e39d3](https://github.com/Sage/carbon/commit/74e39d3cc1892be5197d2d7d4348a6bf3f81e936)), closes [#7657](https://github.com/Sage/carbon/issues/7657)
6+
7+
## [158.14.1](https://github.com/Sage/carbon/compare/v158.14.0...v158.14.1) (2025-12-05)
8+
9+
### Bug Fixes
10+
11+
* **submenu:** ensure correct focus styling is applied to menu-item ([21b1519](https://github.com/Sage/carbon/commit/21b1519594f8320f80d3c9ee22cc131f0a103390))
12+
13+
## [158.14.0](https://github.com/Sage/carbon/compare/v158.13.2...v158.14.0) (2025-12-04)
14+
15+
### Features
16+
17+
* **link:** add support for the download attribute ([789f94f](https://github.com/Sage/carbon/commit/789f94f7901f3848aa73f482ef86797525041ead))
18+
19+
### Bug Fixes
20+
21+
* **file-input:** add download attribute to completed state link ([6971449](https://github.com/Sage/carbon/commit/6971449b682830e9a02bcb04b89405965fb58c54)), closes [#7633](https://github.com/Sage/carbon/issues/7633)
22+
123
## [158.13.2](https://github.com/Sage/carbon/compare/v158.13.1...v158.13.2) (2025-12-02)
224

325
### Bug Fixes

contributing/dev-environment-setup.md

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,31 @@
22

33
This guide will provide you with the information you need to be able to get started on your development journey.
44

5-
## Contents
6-
7-
- [Text Editor](#text-editor)
8-
- [Useful VSCode Extensions to Install](#useful-vscode-extensions-to-install)
9-
- [Installing Node.js, NPM, and Git](#installing-nodejs-npm-and-git)
10-
11-
## Text Editor
12-
13-
[VSCode](https://code.visualstudio.com/) is our preferred text editor. We advise that you follow the installation instructions provided by Microsoft. Installation instructions can be found [here](https://code.visualstudio.com/docs/setup/mac) for Mac users and [here](https://code.visualstudio.com/docs/setup/windows) for Windows users.
14-
15-
## Useful VSCode Extensions to Install
16-
17-
You can browse and install extensions from within VS Code. Simply bring up the Extensions view by clicking on the [Extensions icon](https://code.visualstudio.com/assets/docs/editor/extension-gallery/extensions-view-icon.png) in the Activity Bar on the side of VS Code or the `View: Extensions command` (⇧+⌘+X) on Mac or (shift+alt+x) on Windows.
18-
19-
Below are some useful extensions that we recommend using with Carbon:
20-
21-
- [Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag) - automatically adds the closing tags for HTML and XML.
22-
- [Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag) - automatically renames HTML and XML tags.
23-
- [CodeSnap](https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap) - lets you take screenshots of your code and save them to a clipboard.
24-
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - basic spelling checker that works well with many file types. There is an [additional extension for getting the British English dictionary](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker-british-english).
25-
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - a code quality tool that checks your code for syntax errors and can automatically fix the syntax errors.
26-
- [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - provides a list of complementary features for use with git repositories, such as in-editor file annotations identifying who changed a line of code last.
27-
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - linter and style checker for markdown files.
28-
- [MDX](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) - official extension for supporting MDX files.
29-
- [Package Json Upgrade](https://marketplace.visualstudio.com/items?itemName=codeandstuff.package-json-upgrade) - adds in-editor file annotations to `package.json` stating if an installed package has a newly available version.
30-
- [Playwright Test for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright) - for running Playwright tests directly within VSCode.
31-
- [Total TypeScript](https://marketplace.visualstudio.com/items?itemName=mattpocock.ts-error-translator) - provides human-readable hints for TypeScript errors that are difficult to decipher.
32-
- [vscode-styled-components](https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components) - this extension helps with the readability of the code for styled-components. The tool highlights syntax and reports any syntax errors in the code.
33-
34-
## Installing Node.js, NPM, and Git
5+
- [Getting Your Dev Environment Started](#getting-your-dev-environment-started)
6+
- [Prerequisites](#prerequisites)
7+
- [Node.js \& NPM](#nodejs--npm)
8+
- [Git](#git)
9+
- [New to Git?](#new-to-git)
10+
- [Git Alias](#git-alias)
11+
- [Signing commits](#signing-commits)
12+
- [First time setup](#first-time-setup)
13+
- [Optional supplementary tools](#optional-supplementary-tools)
14+
15+
## Prerequisites
3516

3617
### Node.js & NPM
3718

38-
**NOTE: Carbon requires all contributors be on Node version 20 ("iron").**
39-
40-
The recommended way to install Node and npm is using [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm).
41-
Once you have installed nvm, you should run:
19+
Carbon is developed against a specific version of Node.js specified in the `.nvmrc` file. We recommend using [nvm](https://github.com/nvm-sh/nvm) for installing the correct version of Node.js and npm, this will allow you to install the correct version by running the following command:
4220

4321
```sh
44-
nvm install lts/iron
45-
```
22+
# Check node version you're currently using:
23+
node --version
4624

47-
which will install the correct version of Node and npm. You can verify the installed versions using `node --version` and `npm --v`.
25+
# Switch to version required for Carbon:
26+
nvm use
27+
```
4828

49-
> If you are already a `nvm` user, you can also do `nvm use` which will automatically switch to the correct Node and npm versions.
29+
If you are a Windows user, you'll need to [enable the Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install) to allow you to execute our scripts.
5030

5131
### Git
5232

@@ -73,11 +53,11 @@ You need to add the following to `~/.gitconfig`:
7353

7454
This allows you to review PRs very easily. For example, if you are reviewing [https://github.com/Sage/carbon/pull/2408/](https://github.com/Sage/carbon/pull/2408/), you can use `git pr 2408` which will check out a new branch named pr/2408. This gives you the ability to review, change branches, merge and make experimental changes. The second command `git pr-clean` removes all branches that start with pr/. This is a useful for housekeeping of branches.
7555

76-
#### GPG Verification
56+
### Signing commits
7757

78-
We strongly encourage our contributors to verify their commits with a GPG key. To set this up, please follow these instructions from GitHub [to enable GPG commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification).
58+
Carbon requires all git commits to be signed with a GPG key for verification. To set this up, please follow these instructions [to create a GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#gpg-commit-signature-verification) and associate it with Git and your GitHub account.
7959

80-
Then add this to your profile (i.e`~/.zshrc` or `~/.bashrc`) so `gpg-agent` can prompt for your passphrase:
60+
Then add this to your shell profile (i.e`~/.zshrc` or `~/.bashrc`), so `gpg-agent` can prompt for your passphrase:
8161

8262
`export GPG_TTY=$(tty)`
8363

@@ -88,3 +68,30 @@ Then execute this command to sign all of your commits by default:
8868
Restart of gpg-agent may be required. Use the command below to kill it (it will start next time its needed):
8969

9070
`$ gpgconf --kill gpg-agent`
71+
72+
## First time setup
73+
74+
Run the following command once to set-up your local environment:
75+
76+
```sh
77+
npm run setup
78+
```
79+
80+
Now you're ready to contribute!
81+
82+
## Optional supplementary tools
83+
84+
If you use VSCode, we suggest using the following extensions as useful aids:
85+
86+
- [Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag) - automatically adds the closing tags for HTML and XML.
87+
- [Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag) - automatically renames HTML and XML tags.
88+
- [CodeSnap](https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap) - lets you take screenshots of your code and save them to a clipboard.
89+
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - basic spelling checker that works well with many file types. There is an [additional extension for getting the British English dictionary](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker-british-english).
90+
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - a code quality tool that checks your code for syntax errors and can automatically fix the syntax errors.
91+
- [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - provides a list of complementary features for use with git repositories, such as in-editor file annotations identifying who changed a line of code last.
92+
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - linter and style checker for markdown files.
93+
- [MDX](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) - official extension for supporting MDX files.
94+
- [Package Json Upgrade](https://marketplace.visualstudio.com/items?itemName=codeandstuff.package-json-upgrade) - adds in-editor file annotations to `package.json` stating if an installed package has a newly available version.
95+
- [Playwright Test for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright) - for running Playwright tests directly within VSCode.
96+
- [Total TypeScript](https://marketplace.visualstudio.com/items?itemName=mattpocock.ts-error-translator) - provides human-readable hints for TypeScript errors that are difficult to decipher.
97+
- [vscode-styled-components](https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components) - this extension helps with the readability of the code for styled-components. The tool highlights syntax and reports any syntax errors in the code.

package-lock.json

Lines changed: 23 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{
22
"name": "carbon-react",
3-
"version": "158.13.2",
3+
"version": "158.14.2",
44
"description": "A library of reusable React components for easily building user interfaces.",
55
"files": [
66
"lib",
77
"esm"
88
],
99
"scripts": {
10+
"setup": "npm ci && npm run prepare",
1011
"start": "npm run generate-tokens:dev && node ./scripts/check_node_version.mjs && dotenvx run -- storybook dev -p 9001 -c .storybook",
1112
"start:strict-mode": "npm run generate-tokens:dev && node ./scripts/check_node_version.mjs && dotenvx run --env ENABLE_REACT_STRICT_MODE=true -- storybook dev -p 9001 -c .storybook",
1213
"test": "npm run generate-tokens:dev && jest --config=./jest.config.ts",
1314
"test-update": "jest --config=./jest.config.ts --updateSnapshot",
1415
"test-storybook": "test-storybook --url http://127.0.0.1:9001",
1516
"format": "prettier --write './{src,playwright}/**/*.{js,jsx,ts,tsx}'",
1617
"lint": "npm run generate-tokens:dev && eslint ./src ./playwright --max-warnings=636 --report-unused-disable-directives",
17-
"precompile": "npm run generate-tokens && npm run type-check && npm run build",
18-
"prepublishOnly": "npm run precompile",
1918
"build-storybook": "npm run generate-tokens:dev && dotenvx run -- storybook build -c .storybook",
2019
"build-storybook:prod": "npm run generate-tokens && dotenvx run -f .env.production -- storybook build -c .storybook",
2120
"start:static": "npx http-server -p 9001 ./storybook-static",
@@ -33,7 +32,7 @@
3332
"clear-playwright-coverage-json": "rimraf ./playwright/coverage/*.json",
3433
"test:ct:coverage": "npm run generate-tokens:dev && npm run clear-playwright-cache && npm run clear-playwright-coverage-json && rimraf ./playwright/coverage && playwright test -c playwright-ct.config.ts",
3534
"pw:coverage:report": "nyc report --reporter=html --report-dir=./playwright/coverage --temp-dir=./playwright/coverage",
36-
"build": "npm run clean-lib && rollup -c \"./rollup.config.mjs\" && npm run build:generate-package-json-files && npm run build:move-svg && npm run build:types",
35+
"build": "npm run clean-lib && npm run generate-tokens && npm run type-check && rollup -c \"./rollup.config.mjs\" && npm run build:generate-package-json-files && npm run build:move-svg && npm run build:types",
3736
"build:generate-package-json-files": "node ./scripts/generate_package_json_files/index.js",
3837
"build:move-svg": "node ./scripts/copy_svg/index.js",
3938
"generate-tokens": "rimraf ./src/components/tokens-wrapper/static-tokens && node ./scripts/generate_tokens/generate_tokens.mjs",
@@ -51,7 +50,7 @@
5150
"homepage": "https://carbon.sage.com",
5251
"peerDependencies": {
5352
"@sage/design-tokens": "^4.17.0",
54-
"@sage/design-tokens-fusion": "npm:@sage/design-tokens@^17.1.1",
53+
"@sage/design-tokens-fusion": "npm:@sage/design-tokens@^17.4.0",
5554
"react": "^17.0.2 || ^18.0.0",
5655
"react-dom": "^17.0.2 || ^18.0.0",
5756
"styled-components": "^5.3.11"
@@ -79,7 +78,7 @@
7978
"@rollup/plugin-terser": "^0.4.4",
8079
"@rollup/plugin-url": "^8.0.2",
8180
"@sage/design-tokens": "^4.17.0",
82-
"@sage/design-tokens-fusion": "npm:@sage/design-tokens@^17.1.1",
81+
"@sage/design-tokens-fusion": "npm:@sage/design-tokens@^17.4.0",
8382
"@semantic-release/changelog": "^6.0.3",
8483
"@semantic-release/exec": "^6.0.3",
8584
"@semantic-release/git": "^10.0.1",
@@ -128,7 +127,7 @@
128127
"babel-jest": "^29.7.0",
129128
"babel-plugin-dev-expression": "^0.2.3",
130129
"browserslist": "^4.26.3",
131-
"chromatic": "^6.17.4",
130+
"chromatic": "13.3.3",
132131
"conventional-changelog-conventionalcommits": "^8.0.0",
133132
"core-js": "^3.45.1",
134133
"css-loader": "^6.8.1",

0 commit comments

Comments
 (0)