@rimori/react-client 0.4.0-next.3 → 0.4.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ name: Create Release Branch
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ - cron: '0 11 * * 1' # Monday at 11:00 UTC
7
+ - cron: '0 11 * * 4' # Thursday at 11:00 UTC
8
+
9
+ jobs:
10
+ create-release:
11
+ uses: rimori-org/pipeline-templates/.github/workflows/package-create-release-branch.yml@main
12
+ secrets: inherit
@@ -0,0 +1,21 @@
1
+ name: Publish Rimori React Client
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - dev
7
+ - main
8
+ paths:
9
+ - '**'
10
+ - '!.github/workflows/**'
11
+
12
+ jobs:
13
+ pre-release:
14
+ if: github.ref == 'refs/heads/dev'
15
+ uses: rimori-org/pipeline-templates/.github/workflows/package-pre-release.yml@main
16
+ secrets: inherit
17
+
18
+ release:
19
+ if: github.ref == 'refs/heads/main'
20
+ uses: rimori-org/pipeline-templates/.github/workflows/package-release-on-merge.yml@main
21
+ secrets: inherit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimori/react-client",
3
- "version": "0.4.0-next.3",
3
+ "version": "0.4.0-next.4",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  "format": "prettier --write ."
24
24
  },
25
25
  "peerDependencies": {
26
- "@rimori/client": "2.4.0-next.4",
26
+ "@rimori/client": "2.5.3-next.0",
27
27
  "react": "^18.1.0",
28
28
  "react-dom": "^18.1.0"
29
29
  },
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "@eslint/js": "^9.37.0",
37
- "@rimori/client": "2.4.0-next.4",
37
+ "@rimori/client": "2.5.3-next.0",
38
38
  "@types/react": "^18.3.21",
39
39
  "eslint-config-prettier": "^10.1.8",
40
40
  "eslint-plugin-prettier": "^5.5.4",
@@ -217,3 +217,5 @@ function StandaloneAuth({ onLogin }: { onLogin: (user: string, password: string)
217
217
  </div>
218
218
  );
219
219
  }
220
+
221
+ // test
package/tsconfig.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "rootDir": "src",
5
5
  "module": "ESNext",
6
6
  "target": "ES6",
7
+ "lib": ["ES2019", "DOM"],
7
8
  "declaration": true,
8
9
  "jsx": "react-jsx",
9
10
  "moduleResolution": "node",
@@ -1,149 +0,0 @@
1
- name: Pre-Release Rimori React Client
2
-
3
- on:
4
- push:
5
- branches: [dev]
6
- paths:
7
- - '**'
8
- - '!.github/workflows/**'
9
-
10
- jobs:
11
- pre-release:
12
- runs-on: ubuntu-latest
13
- permissions:
14
- contents: write
15
- id-token: write
16
-
17
- steps:
18
- - name: Checkout repository
19
- uses: actions/checkout@v4
20
- with:
21
- token: ${{ secrets.GITHUB_TOKEN }}
22
- fetch-depth: 0
23
-
24
- - name: Setup Node.js
25
- uses: actions/setup-node@v4
26
- with:
27
- node-version: '20'
28
- registry-url: 'https://registry.npmjs.org'
29
- cache: 'yarn'
30
- cache-dependency-path: yarn.lock
31
-
32
- - name: Update npm
33
- run: npm install -g npm@latest
34
-
35
- - name: Get latest @rimori/client@next version
36
- id: client-version
37
- run: |
38
- VERSION=$(npm view @rimori/client@next version 2>/dev/null || echo "")
39
- if [ -z "$VERSION" ]; then
40
- echo "⚠️ Warning: No @rimori/client@next version found. Using current dependency version."
41
- VERSION=$(node -p "require('./package.json').peerDependencies['@rimori/client'] || require('./package.json').devDependencies['@rimori/client']")
42
- # Remove ^ prefix if present
43
- VERSION="${VERSION#^}"
44
- fi
45
- echo "version=$VERSION" >> $GITHUB_OUTPUT
46
- echo "Using @rimori/client version: $VERSION"
47
-
48
- - name: Update @rimori/client dependency
49
- run: |
50
- # Update both peerDependencies and devDependencies
51
- yarn add "@rimori/client@${{ steps.client-version.outputs.version }}" --dev --exact
52
- # Also update peerDependencies using node
53
- node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json')); if (pkg.peerDependencies && pkg.peerDependencies['@rimori/client']) { pkg.peerDependencies['@rimori/client'] = '${{ steps.client-version.outputs.version }}'; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); }"
54
- echo "Updated @rimori/client to ${{ steps.client-version.outputs.version }}"
55
-
56
- - name: Install dependencies
57
- run: yarn install
58
-
59
- - name: Build react-client (TypeScript verification)
60
- run: yarn build
61
-
62
- - name: Calculate next pre-release version
63
- id: version
64
- run: |
65
- # Read current version from package.json (may be base or pre-release)
66
- CURRENT_VERSION=$(node -p "require('./package.json').version")
67
-
68
- # Extract base version (strip any pre-release suffix)
69
- # Examples: "0.3.0" -> "0.3.0", "0.3.0-next.5" -> "0.3.0"
70
- if [[ "$CURRENT_VERSION" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
71
- BASE_VERSION="${BASH_REMATCH[1]}"
72
- else
73
- BASE_VERSION="$CURRENT_VERSION"
74
- fi
75
-
76
- # Try to get latest next version from npm
77
- PACKAGE_NAME="@rimori/react-client"
78
- LATEST_NEXT=$(npm view ${PACKAGE_NAME}@next version 2>/dev/null || echo "none")
79
-
80
- if [ "$LATEST_NEXT" != "none" ]; then
81
- # Extract base version and pre-release number from latest next version
82
- # Example: "0.3.0-next.5" -> extract "0.3.0" and "5"
83
- if [[ "$LATEST_NEXT" =~ ^([0-9]+\.[0-9]+\.[0-9]+)-next\.([0-9]+)$ ]]; then
84
- LATEST_BASE="${BASH_REMATCH[1]}"
85
- PRERELEASE_NUM="${BASH_REMATCH[2]}"
86
-
87
- # If base version changed, reset to 1, otherwise increment
88
- if [ "$LATEST_BASE" != "$BASE_VERSION" ]; then
89
- NEW_NUM=1
90
- else
91
- NEW_NUM=$((PRERELEASE_NUM + 1))
92
- fi
93
- else
94
- # Fallback: if format doesn't match, start at 1
95
- NEW_NUM=1
96
- fi
97
- else
98
- # First pre-release
99
- NEW_NUM=1
100
- fi
101
-
102
- NEW_VERSION="${BASE_VERSION}-next.${NEW_NUM}"
103
- echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
104
- echo "Base version: $BASE_VERSION"
105
- echo "Calculated next version: $NEW_VERSION"
106
-
107
- - name: Update package.json version
108
- run: |
109
- # Use node to update version directly (yarn version creates git tags)
110
- node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json')); pkg.version = '${{ steps.version.outputs.new_version }}'; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');"
111
-
112
- - name: Publish to npm
113
- run: npm publish --tag next --access public
114
- # Uses OIDC token automatically (no NODE_AUTH_TOKEN needed)
115
- # Requires npm 11.5.1+ and id-token: write permission (already set)
116
-
117
- - name: Output published version
118
- run: |
119
- echo "✅ Published @rimori/react-client@${{ steps.version.outputs.new_version }} to npm with @next tag"
120
- echo "Using @rimori/client@${{ steps.client-version.outputs.version }}"
121
-
122
- - name: Create git tag
123
- run: |
124
- git config --local user.email "action@github.com"
125
- git config --local user.name "GitHub Action"
126
- git tag "v${{ steps.version.outputs.new_version }}" -m "Pre-release v${{ steps.version.outputs.new_version }}"
127
- git push origin "v${{ steps.version.outputs.new_version }}"
128
- echo "🏷️ Created and pushed tag v${{ steps.version.outputs.new_version }}"
129
-
130
- - name: Notify Slack
131
- if: always()
132
- uses: slackapi/slack-github-action@v1.24.0
133
- with:
134
- channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
135
- payload: |
136
- {
137
- "text": "Pre-Release Pipeline Status",
138
- "blocks": [
139
- {
140
- "type": "section",
141
- "text": {
142
- "type": "mrkdwn",
143
- "text": "📦 *@rimori/react-client Pre-Release*\n\n*Branch:* ${{ github.ref_name }}\n*Version:* ${{ steps.version.outputs.new_version }}\n*Using @rimori/client:* ${{ steps.client-version.outputs.version }}\n*Author:* ${{ github.actor }}\n*Pipeline:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>\n\n${{ job.status == 'success' && '✅ Successfully published to npm with @next tag!' || '❌ Pipeline failed. Check the logs for details.' }}"
144
- }
145
- }
146
- ]
147
- }
148
- env:
149
- SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}