Skip to content

Commit 26e80a0

Browse files
authored
Merge branch 'main' into fix/event-parameters2
2 parents 0569e6c + 31bba60 commit 26e80a0

27 files changed

Lines changed: 1497 additions & 2364 deletions

‎.changeset/README.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets).
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
9+
10+
## How this repo uses Changesets
11+
12+
This monorepo replaced Lerna with [Changesets](https://github.com/changesets/changesets) for
13+
versioning and releases. The flow is:
14+
15+
1. **In your PR**, run `yarn changeset` and answer the prompts (which packages, semver level,
16+
summary). Commit the generated `.changeset/<random-name>.md` file alongside your code change.
17+
2. When your PR is merged to `main`, the **Release** workflow opens (or updates) a single
18+
`Version Packages` PR that aggregates all pending changesets — bumping versions and updating
19+
each package's `CHANGELOG.md`.
20+
3. **Merging the `Version Packages` PR** triggers the same workflow to publish the new versions
21+
to npm.
22+
23+
Private packages (`test-packages/*`, `demos/*`) are skipped automatically by `changeset publish`.
24+
Only the public packages under `packages/*` are released.
25+
26+
If a change does not warrant a release (docs-only, internal tooling, test refactors, etc.) run `yarn changeset:empty` and commit the generated file — it satisfies the required changeset check without producing any package bump.

‎.changeset/config.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "UI5/typescript" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["@ui5/openui5-snapshot-test", "@ui5/typed-json-model"]
11+
}

‎.changeset/fresh-cobras-send.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎.github/workflows/changeset.yml‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Changeset
2+
3+
# Verifies that every PR carries a changeset (or an explicit empty one).
4+
# Runs only on pull_request — `push` to main carries already-merged
5+
# changesets that the Release workflow then consumes.
6+
7+
on:
8+
pull_request:
9+
branches: [main]
10+
workflow_dispatch:
11+
inputs:
12+
pr_number:
13+
description: "PR number to test (for fork PRs)"
14+
required: true
15+
type: string
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
changeset:
22+
name: Changeset present
23+
runs-on: ubuntu-latest
24+
# Skip on the auto-generated "Version Packages" PR (it consumes all changesets).
25+
if: github.head_ref != 'changeset-release/main'
26+
steps:
27+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
28+
with:
29+
ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }}
30+
# Full history so `changeset status --since=origin/main` can diff.
31+
fetch-depth: 0
32+
33+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
34+
with:
35+
node-version: 24.x
36+
37+
- name: Install dependencies
38+
run: yarn --frozen-lockfile
39+
40+
# Fails the PR if no changeset describes the change.
41+
# Add one with `yarn changeset` (or `yarn changeset:empty` for PRs
42+
# that don't need a release entry) and commit it.
43+
# We check `.changesets` (not `.releases`) so that empty changesets
44+
# — which have 0 package bumps but still document the PR — pass.
45+
- name: Verify changeset is present
46+
run: |
47+
yarn changeset status --since=origin/main --output=/tmp/cs.json
48+
if [ "$(jq '.changesets | length' /tmp/cs.json)" -eq 0 ]; then
49+
echo "::error::No changeset found on this PR. Run 'yarn changeset' (or 'yarn changeset:empty' for PRs that don't need a release entry) and commit the file."
50+
exit 1
51+
fi

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929
- 22.x
3030
- 24.x
3131
steps:
32-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
32+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
3333
with:
3434
ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }}
35-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
35+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3636
with:
3737
node-version: ${{ matrix.node_version }}
3838

3939
- name: Install dependencies
40-
run: yarn
40+
run: yarn --frozen-lockfile
4141

4242
- name: Build
4343
run: yarn run ci

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ jobs:
4444

4545
steps:
4646
- name: Checkout repository
47-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
47+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4848
with:
4949
ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }}
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3
53+
uses: github/codeql-action/init@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3.35.3
5454
with:
5555
languages: ${{ matrix.language }}
5656
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -61,7 +61,7 @@ jobs:
6161
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6262
# If this step fails, then you should remove it and run the build manually (see below)
6363
- name: Autobuild
64-
uses: github/codeql-action/autobuild@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3
64+
uses: github/codeql-action/autobuild@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3.35.3
6565

6666
# ℹ️ Command-line programs to run using the OS shell.
6767
# 📚 https://git.io/JvXDl
@@ -75,4 +75,4 @@ jobs:
7575
# make release
7676

7777
- name: Perform CodeQL Analysis
78-
uses: github/codeql-action/analyze@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3
78+
uses: github/codeql-action/analyze@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3.35.3

‎.github/workflows/commitlint.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
commitlint:
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
28+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2929
with:
3030
ref: ${{ inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number) || '' }}
3131
fetch-depth: 0
32-
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6
32+
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1

‎.github/workflows/release.yml‎

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,71 @@
11
name: Release
2+
23
on:
34
push:
45
branches: [main]
5-
workflow_dispatch:
6+
workflow_dispatch: # Manual trigger
7+
8+
env:
9+
HUSKY_SKIP: true
10+
11+
# Skip when the head commit is the workflow's own version-bump commit, to avoid loops.
12+
concurrency:
13+
group: release-${{ github.ref }}
14+
cancel-in-progress: false
615

716
permissions:
8-
contents: read
9-
id-token: write
17+
contents: write # create the "Version Packages" PR and tags
18+
pull-requests: write # open/update the version PR
19+
id-token: write # REQUIRED for npm OIDC trusted publishing
1020

1121
jobs:
1222
release:
1323
runs-on: ubuntu-latest
14-
# Only gate push events by commit message; allow workflow_dispatch always
15-
if: >
16-
github.event_name == 'workflow_dispatch' ||
17-
(github.event_name == 'push' && contains(github.event.head_commit.message, 'chore(release): publish'))
24+
if: github.event_name != 'push' || !contains(github.event.head_commit.message, 'skip ci')
1825
steps:
19-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
26+
- name: Checkout
27+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2028
with:
2129
fetch-depth: 0
2230

23-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
31+
- name: Setup node
32+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2433
with:
2534
node-version: 24.15.0
35+
registry-url: https://registry.npmjs.org
2636

2737
- name: Install dependencies
28-
run: yarn
38+
run: yarn --frozen-lockfile
2939

3040
- name: Build
3141
run: yarn build
3242

33-
# Choose publish command based on the event type
34-
- name: Publish to NPM (push)
35-
if: github.event_name == 'push'
36-
run: npm run release:publish
43+
- name: Detect auth mode (OIDC vs token)
44+
env:
45+
NPM_BOOTSTRAP_TOKEN: ${{ secrets.NPM_BOOTSTRAP_TOKEN }}
46+
run: |
47+
if [ -n "$NPM_BOOTSTRAP_TOKEN" ]; then
48+
echo "::warning::NPM bootstrap token is configured; token-based auth will be used (OIDC will not be exercised)."
49+
else
50+
echo "No NPM bootstrap token configured; using OIDC trusted publishing."
51+
fi
3752
38-
- name: Publish to NPM (manual)
39-
if: github.event_name == 'workflow_dispatch'
40-
run: npm run release:publish-manual
53+
- name: Configure NPM bootstrap token (non OIDC flow)
54+
env:
55+
NPM_BOOTSTRAP_TOKEN: ${{ secrets.NPM_BOOTSTRAP_TOKEN }}
56+
if: ${{ env.NPM_BOOTSTRAP_TOKEN != '' }}
57+
run: |
58+
echo "//registry.npmjs.org/:_authToken=${NPM_BOOTSTRAP_TOKEN}" >> ~/.npmrc
59+
60+
- name: Create Release Pull Request or Publish
61+
id: changesets
62+
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
63+
with:
64+
version: yarn run version-packages
65+
publish: yarn run release-publish
66+
commit: "chore(release): publish"
67+
title: "chore(release): publish"
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOOTSTRAP_TOKEN }}
71+
NPM_CONFIG_PROVENANCE: "true"

‎.yarnrc‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Supply-chain hardening
2+
3+
# Fail if yarn.lock is out of sync with package.json.
4+
# Prevents non-deterministic installs in CI and local dev.
5+
--install.frozen-lockfile true
6+
7+
# Pin exact versions on yarn add (no ^ or ~ prefix).
8+
save-prefix ""
9+
10+
# Explicit registry — prevents dependency confusion.
11+
registry "https://registry.yarnpkg.com"

0 commit comments

Comments
 (0)