Skip to content

Commit 4eb472d

Browse files
Update package to use react-on-rails-rsc package instead of the old private package
1 parent fb69bf7 commit 4eb472d

File tree

9 files changed

+17
-36
lines changed

9 files changed

+17
-36
lines changed

.github/workflows/examples.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ jobs:
6262
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
6363
- id: get-sha
6464
run: echo "sha=\"$(git rev-parse HEAD)\"" >> "$GITHUB_OUTPUT"
65-
- name: Configure .npmrc for react-on-rails-rsc
66-
run: |
67-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.SHAKACODE_TOOLS_PACKAGES_TOKEN }}" >> .npmrc
68-
echo "@shakacode-tools:registry=https://npm.pkg.github.com/" >> .npmrc
6965
- name: Install Node modules with Yarn for renderer package
7066
run: |
7167
yarn install --no-progress --no-emoji

.github/workflows/lint-js-and-ruby.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
with:
4343
path: vendor/bundle
4444
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-oldest
45-
- name: Configure .npmrc for react-on-rails-rsc
46-
run: |
47-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.SHAKACODE_TOOLS_PACKAGES_TOKEN }}" >> .npmrc
48-
echo "@shakacode-tools:registry=https://npm.pkg.github.com/" >> .npmrc
4945
- name: Install Node modules with Yarn for renderer package
5046
run: |
5147
yarn install --no-progress --no-emoji

.github/workflows/main.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ jobs:
4646
with:
4747
path: node_modules
4848
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
49-
- name: Configure .npmrc for react-on-rails-rsc
50-
run: |
51-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.SHAKACODE_TOOLS_PACKAGES_TOKEN }}" >> .npmrc
52-
echo "@shakacode-tools:registry=https://npm.pkg.github.com/" >> .npmrc
5349
- name: Install Node modules with Yarn for renderer package
5450
run: |
5551
yarn install --no-progress --no-emoji
@@ -148,10 +144,6 @@ jobs:
148144
with:
149145
path: spec/dummy/public/webpack
150146
key: dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-${{ matrix.versions }}
151-
- name: Configure .npmrc for react-on-rails-rsc
152-
run: |
153-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.SHAKACODE_TOOLS_PACKAGES_TOKEN }}" >> .npmrc
154-
echo "@shakacode-tools:registry=https://npm.pkg.github.com/" >> .npmrc
155147
- name: Install Node modules with Yarn
156148
run: |
157149
yarn install --no-progress --no-emoji

.github/workflows/package-js-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ jobs:
3636
- name: run conversion script
3737
if: matrix.versions == 'oldest'
3838
run: script/convert
39-
- name: Configure .npmrc for react-on-rails-rsc
40-
run: |
41-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.SHAKACODE_TOOLS_PACKAGES_TOKEN }}" >> .npmrc
42-
echo "@shakacode-tools:registry=https://npm.pkg.github.com/" >> .npmrc
4339
- name: Install Node modules with Yarn for renderer package
4440
run: |
4541
yarn install --no-progress --no-emoji

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
moduleNameMapper:
1010
nodeVersion < 18
1111
? {
12-
'@shakacode-tools/react-on-rails-rsc/client': '<rootDir>/node_package/tests/emptyForTesting.js',
12+
'react-on-rails-rsc/client': '<rootDir>/node_package/tests/emptyForTesting.js',
1313
'^@testing-library/dom$': '<rootDir>/node_package/tests/emptyForTesting.js',
1414
'^@testing-library/react$': '<rootDir>/node_package/tests/emptyForTesting.js',
1515
}

node_package/src/RSCClientRoot.ts

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

33
import * as React from 'react';
44
import * as ReactDOMClient from 'react-dom/client';
5-
import { createFromReadableStream } from '@shakacode-tools/react-on-rails-rsc/client';
5+
import { createFromReadableStream } from 'react-on-rails-rsc/client';
66
import { fetch } from './utils';
77
import transformRSCStreamAndReplayConsoleLogs from './transformRSCStreamAndReplayConsoleLogs';
88
import { RailsContext, RenderFunction } from './types';
@@ -46,7 +46,7 @@ const fetchRSC = ({ componentName, rscPayloadGenerationUrlPath, componentProps }
4646
* 4. Uses React.use() to handle the async data fetching
4747
*
4848
* @requires React 19+
49-
* @requires @shakacode-tools/react-on-rails-rsc
49+
* @requires react-on-rails-rsc
5050
*/
5151
const RSCClientRoot: RenderFunction = async ({
5252
componentName,

node_package/src/ReactOnRailsRSC.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderToPipeableStream } from '@shakacode-tools/react-on-rails-rsc/server.node';
1+
import { renderToPipeableStream } from 'react-on-rails-rsc/server.node';
22
import { PassThrough, Readable } from 'stream';
33
import type { ReactElement } from 'react';
44

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"@arethetypeswrong/cli": "^0.17.4",
2121
"@babel/core": "^7.20.12",
2222
"@babel/preset-env": "^7.20.2",
23-
"@shakacode-tools/react-on-rails-rsc": "^19.0.0",
2423
"@testing-library/dom": "^10.4.0",
2524
"@testing-library/jest-dom": "^6.6.3",
2625
"@testing-library/react": "^16.2.0",
@@ -52,13 +51,15 @@
5251
"prop-types": "^15.8.1",
5352
"react": "^19.0.0",
5453
"react-dom": "^19.0.0",
54+
"react-on-rails-rsc": "19.0.0",
5555
"redux": "^4.2.1",
5656
"ts-jest": "^29.2.5",
5757
"typescript": "^5.6.2"
5858
},
5959
"peerDependencies": {
6060
"react": ">= 16",
61-
"react-dom": ">= 16"
61+
"react-dom": ">= 16",
62+
"react-on-rails-rsc": "19.0.0"
6263
},
6364
"files": [
6465
"node_package/lib"

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,13 +1380,6 @@
13801380
"@nodelib/fs.scandir" "2.1.3"
13811381
fastq "^1.6.0"
13821382

1383-
"@shakacode-tools/react-on-rails-rsc@^19.0.0":
1384-
version "19.0.0"
1385-
resolved "https://npm.pkg.github.com/download/@shakacode-tools/react-on-rails-rsc/19.0.0/9ed22080a97f3f9f3d9eaad9a9c6f49f6adf925d#9ed22080a97f3f9f3d9eaad9a9c6f49f6adf925d"
1386-
integrity sha512-r6ENgCLeqechHHDZsAtxc64i6y4Tl0NG/EIlFvSxOLXx3u8qM2OWs7HLQCwSRo9QJmySteuzIhS/vdOpC8PRww==
1387-
dependencies:
1388-
react-server-dom-webpack "19.0.0"
1389-
13901383
"@sinclair/typebox@^0.27.8":
13911384
version "0.27.8"
13921385
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
@@ -1739,9 +1732,9 @@ acorn@^8.1.0, acorn@^8.8.1:
17391732
integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==
17401733

17411734
acorn@^8.11.0:
1742-
version "8.14.0"
1743-
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0"
1744-
integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==
1735+
version "8.14.1"
1736+
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.1.tgz#721d5dc10f7d5b5609a891773d47731796935dfb"
1737+
integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==
17451738

17461739
agent-base@6:
17471740
version "6.0.2"
@@ -5101,6 +5094,13 @@ react-is@^18.0.0:
51015094
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
51025095
integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==
51035096

5097+
5098+
version "19.0.0"
5099+
resolved "https://registry.yarnpkg.com/react-on-rails-rsc/-/react-on-rails-rsc-19.0.0.tgz#0061d8f3eb7cdf12a23c66985212f46e3e2ed2ef"
5100+
integrity sha512-70K46d9Zs071VgUNxZLz0ModMkPRKpSCu5XiICd/8ChMdivSyxdHEZzY4GSiztQnizzKFX7k25N0EIv/DmUPNg==
5101+
dependencies:
5102+
react-server-dom-webpack "19.0.0"
5103+
51045104
51055105
version "19.0.0"
51065106
resolved "https://registry.yarnpkg.com/react-server-dom-webpack/-/react-server-dom-webpack-19.0.0.tgz#c60819b6cb54e317e675ddc0c5959ff915b789d0"

0 commit comments

Comments
 (0)