Skip to content

Commit f886d2e

Browse files
committed
Merge remote-tracking branch 'origin/main' into dependabot/npm_and_yarn/types/turndown-5.0.6
2 parents 7074087 + 4e9484d commit f886d2e

File tree

57 files changed

+688
-1009
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+688
-1009
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ updates:
44
- package-ecosystem: 'npm'
55
directory: '/'
66
schedule:
7-
interval: 'daily'
7+
interval: 'weekly'
88
cooldown:
99
default-days: 14
1010
open-pull-requests-limit: 10

.github/scripts/publish-packages.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,21 @@ if [ "$RELEASE_TYPE" = "stable" ]; then
5151
PKG_FILE="$PKG_LOCATION/package.json"
5252
LOCAL_VERSION=$(jq -r '.version' "$PKG_FILE")
5353

54-
echo "Checking $PACKAGE_NAME (local: v$LOCAL_VERSION)..."
55-
REGISTRY_VERSION=$(npm view "$PACKAGE_NAME" version 2>/dev/null || echo "not-published")
54+
# Determine the dist-tag based on version (same logic as ci-cd.yml)
55+
if [[ "$LOCAL_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-([a-zA-Z]+) ]]; then
56+
NPM_TAG="${BASH_REMATCH[1]}"
57+
else
58+
NPM_TAG="latest"
59+
fi
60+
61+
echo "Checking $PACKAGE_NAME (local: v$LOCAL_VERSION, dist-tag: $NPM_TAG)..."
62+
REGISTRY_VERSION=$(npm view "$PACKAGE_NAME@$NPM_TAG" version 2>/dev/null || echo "not-published")
5663

5764
if [ "$REGISTRY_VERSION" = "not-published" ]; then
58-
echo " → Not yet published, will publish v$LOCAL_VERSION"
65+
echo " → Not yet published on $NPM_TAG tag, will publish v$LOCAL_VERSION"
5966
PACKAGES_TO_PUBLISH="$PACKAGES_TO_PUBLISH $PACKAGE_NAME"
6067
elif [ "$LOCAL_VERSION" != "$REGISTRY_VERSION" ]; then
61-
echo " → Registry: v$REGISTRY_VERSION, Local: v$LOCAL_VERSION"
68+
echo " → Registry ($NPM_TAG): v$REGISTRY_VERSION, Local: v$LOCAL_VERSION"
6269
COMPARISON=$(compare_versions "$LOCAL_VERSION" "$REGISTRY_VERSION")
6370
if [ "$COMPARISON" = "greater" ]; then
6471
echo " → Local version is newer, will publish"
@@ -67,7 +74,7 @@ if [ "$RELEASE_TYPE" = "stable" ]; then
6774
echo " → Local version is not newer, skipping"
6875
fi
6976
else
70-
echo " → Already published at v$LOCAL_VERSION, skipping"
77+
echo " → Already published at v$LOCAL_VERSION on $NPM_TAG tag, skipping"
7178
fi
7279
done < <(yarn workspaces list --no-private --json)
7380

.github/workflows/ci-cd.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ permissions:
3333
contents: write
3434
actions: read
3535

36-
concurrency:
37-
group: ${{ github.workflow }}-${{ github.ref }}
38-
cancel-in-progress: true
36+
# Conflicts with merge_group events
37+
# concurrency:
38+
# group: ${{ github.workflow }}-${{ github.ref }}
39+
# cancel-in-progress: true
3940

4041
env:
4142
NODE_VERSION: '22'
@@ -333,13 +334,14 @@ jobs:
333334
echo "✅ All packages published successfully"
334335
echo "release_info=$RELEASE_INFO" >> $GITHUB_OUTPUT
335336
336-
- name: Create GitHub Releases
337-
if: steps.version-check.outputs.has_version_changes == 'true'
338-
env:
339-
GH_TOKEN: ${{ github.token }}
340-
run: |
341-
chmod +x .github/scripts/create-releases.sh
342-
.github/scripts/create-releases.sh "${{ steps.publish.outputs.release_info }}"
337+
# TODO: Doesn't work as we don't have access to create releases
338+
# - name: Create GitHub Releases
339+
# if: steps.version-check.outputs.has_version_changes == 'true'
340+
# env:
341+
# GH_TOKEN: ${{ github.token }}
342+
# run: |
343+
# chmod +x .github/scripts/create-releases.sh
344+
# .github/scripts/create-releases.sh "${{ steps.publish.outputs.release_info }}"
343345

344346
canary:
345347
name: Canary Release

lint-staged.pre-push.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const addWorkspaceCommands = (files, commands, excludeTestFiles = true) => {
6565
// Check if the workspace has a test:coverage script
6666
if (packageJson.scripts?.['test:coverage'] && packageJson.name) {
6767
commands.push(
68-
`yarn workspace ${packageJson.name} run test:coverage`,
68+
`yarn workspace ${packageJson.name} run test:coverage --changed ${filesToProcess.join(' ')}`,
6969
);
7070

7171
// Add coverage check for the changed files in this workspace

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@
2323
"@storybook/addon-docs": "^9.0.0",
2424
"@storybook/react-vite": "^9.0.0",
2525
"@types/ws": "^8.18.1",
26-
"@typescript-eslint/eslint-plugin": "8.44.1",
27-
"@typescript-eslint/parser": "8.44.1",
26+
"@typescript-eslint/eslint-plugin": "8.46.3",
27+
"@typescript-eslint/parser": "8.46.3",
2828
"@vueless/storybook-dark-mode": "^9.0.0",
2929
"boxen": "^8.0.1",
3030
"chalk": "^5.6.2",
3131
"concurrently": "^9.2.1",
32-
"eslint": "9.36.0",
32+
"eslint": "9.39.1",
3333
"eslint-plugin-file-progress": "^3.0.2",
3434
"eslint-plugin-mdx": "^3.6.2",
3535
"eslint-plugin-prettier": "5.5.4",
36-
"eslint-plugin-react-hooks": "^6.0.0",
37-
"eslint-plugin-react-refresh": "^0.4.22",
36+
"eslint-plugin-react-hooks": "^7.0.1",
37+
"eslint-plugin-react-refresh": "^0.4.24",
3838
"eslint-plugin-sonarjs": "^3.0.5",
3939
"husky": "9.1.7",
4040
"lint-staged": "16.2.6",
4141
"pinst": "3.0.0",
4242
"prettier": "3.6.2",
43-
"puppeteer": "^24.29.0",
43+
"puppeteer": "^24.29.1",
4444
"react": "^19.2.0",
4545
"react-dom": "^19.2.0",
4646
"storybook": "^9.0.0",
4747
"storybook-addon-tag-badges": "^2.0.2",
4848
"ts-dedent": "^2.2.0",
4949
"tsx": "^4.20.6",
5050
"typescript": "^5.9.3",
51-
"vite": "^7.1.11",
51+
"vite": "^7.2.1",
5252
"wait-on": "^9.0.1",
5353
"ws": "^8.18.3",
5454
"zx": "^8.8.5"

packages/components/package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@
4343
"@vitest/coverage-v8": "^3.2.4",
4444
"@vitest/ui": "^3.2.4",
4545
"concurrently": "^9.2.1",
46-
"eslint": "9.35.0",
46+
"eslint": "9.39.1",
4747
"eslint-plugin-file-progress": "^3.0.2",
4848
"eslint-plugin-mdx": "3.6.2",
4949
"eslint-plugin-prettier": "5.5.4",
50-
"eslint-plugin-react-hooks": "^6.0.0",
51-
"eslint-plugin-react-refresh": "^0.4.22",
50+
"eslint-plugin-react-hooks": "^7.0.1",
51+
"eslint-plugin-react-refresh": "^0.4.24",
5252
"eslint-plugin-sonarjs": "^3.0.5",
5353
"glob": "11.0.3",
5454
"jest-axe": "10.0.0",
55-
"jsdom": "26.1.0",
55+
"jsdom": "27.1.0",
5656
"lightningcss": "^1.30.2",
5757
"postcss": "8.4.31",
5858
"postcss-preset-env": "10.3.1",
@@ -62,11 +62,11 @@
6262
"react-dropzone": "14.3.8",
6363
"rimraf": "^6.0.1",
6464
"storybook": "^9.0.0",
65-
"typescript": "5.8.2",
66-
"vite": "^7.1.11",
65+
"typescript": "5.9.3",
66+
"vite": "^7.2.1",
6767
"vite-bundle-visualizer": "^1.2.1",
6868
"vite-plugin-dts": "4.5.4",
69-
"vite-plugin-static-copy": "3.1.2",
69+
"vite-plugin-static-copy": "3.1.4",
7070
"vite-tsconfig-paths": "^5.1.4",
7171
"vitest": "3.2.4"
7272
},
@@ -79,5 +79,9 @@
7979
"query-selector-shadow-dom": "1.0.1",
8080
"react-hook-form": "7.55.0",
8181
"use-debounce": "10.0.6"
82+
},
83+
"repository": {
84+
"type": "git",
85+
"url": "https://github.com/iress/design-system"
8286
}
8387
}

packages/components/src/components/Autocomplete/hooks/useAutocompleteSearch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ const useSearchOperations = (
184184
) => {
185185
if (shouldSkipQuery(query)) return;
186186

187+
// eslint-disable-next-line react-hooks/immutability -- this is intentional, as we are tracking the latest request ID for improved UX
187188
const requestId = ++requestIdCounter.current;
188189
updateQueryTracking(query);
189190

packages/components/src/components/Button/Button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ const Button = <
190190

191191
const styles = button({
192192
active:
193+
// eslint-disable-next-line react-hooks/refs -- ref needed for forwarding
193194
active ?? popover?.isActiveActivator(elementRef.current as HTMLElement),
194195
fluid: fluid === true ? 'true' : fluid,
195196
inButtonGroup: !!buttonGroupItem,

packages/components/src/components/Field/Field.test.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ describe('IressField', () => {
110110
});
111111

112112
const input = screen.getByRole('textbox', {
113-
name: `Required ${TEST_LABEL}`,
113+
name: `Required${TEST_LABEL}`,
114114
});
115115
expect(input).toBeInTheDocument();
116116
});
@@ -210,10 +210,9 @@ describe('IressField', () => {
210210
});
211211

212212
const fieldElement = screen.getByTestId(TEST_ID);
213+
console.log(fieldElement.getAttribute('style'));
213214

214-
expect(fieldElement).not.toHaveStyle({
215-
gridTemplateColumns: expect.any(String),
216-
});
215+
expect(fieldElement).not.toHaveAttribute('style');
217216
});
218217

219218
it('does not apply custom label width when not in horizontal mode', () => {

packages/components/src/components/Field/FieldGroup/FieldGroup.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('IressFieldGroup', () => {
121121
});
122122

123123
const field = screen.getByRole('group', {
124-
name: `Required ${TEST_LABEL}`,
124+
name: `Required${TEST_LABEL}`,
125125
});
126126
expect(field).toBeInTheDocument();
127127
});

0 commit comments

Comments
 (0)