Skip to content

Commit 8e3623a

Browse files
committed
fix: restore subpath imports after ESM builder migration
1 parent b054bd9 commit 8e3623a

26 files changed

Lines changed: 603 additions & 2046 deletions

File tree

.github/actions/lint/action.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ runs:
44
using: "composite"
55
steps:
66
- uses: nrwl/nx-set-shas@v4
7-
- uses: './.github/actions/node-cache'
87
- name: Install deps
98
shell: bash
109
run: npm i

.github/actions/setup-environment/action.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,22 @@ description: Setup Node.js and cache dependencies consistently
44
runs:
55
using: "composite"
66
steps:
7+
- name: Show Node.js environment info
8+
shell: bash
9+
run: |
10+
echo "=== Pre-installed Node.js versions ==="
11+
ls -la /opt/hostedtoolcache/node/ 2>/dev/null || ls -la /opt/acttoolcache/node/ 2>/dev/null || echo "No pre-installed Node versions found"
12+
echo "=== Current default Node.js ==="
13+
which node && node --version || echo "No default Node.js found"
14+
echo "=== .nvmrc content ==="
15+
cat .nvmrc 2>/dev/null || echo "No .nvmrc file found"
716
- uses: actions/setup-node@v5
817
with:
9-
node-version: '20.19.5'
10-
- uses: './.github/actions/node-cache'
18+
node-version-file: '.nvmrc'
19+
- name: Show final Node.js version
20+
shell: bash
21+
run: |
22+
echo "=== Final Node.js version after setup ==="
23+
which node && node --version
24+
npm --version
25+
- uses: './.github/actions/node-cache'

.github/actions/test-integration/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ runs:
44
using: "composite"
55
steps:
66
- uses: nrwl/nx-set-shas@v4
7-
- uses: './.github/actions/node-cache'
87
- name: integration test
98
shell: bash
109
run: npm run test:integration

.github/actions/test-unit/action.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ runs:
44
using: "composite"
55
steps:
66
- uses: nrwl/nx-set-shas@v4
7-
- uses: './.github/actions/node-cache'
87
- name: Install deps
98
shell: bash
109
run: npm i

.nvmrc

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

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ We are using Java to install and build this generator. Please install Java and p
1515

1616
### Troubleshooting
1717

18+
#### Publish to local registry
19+
20+
You can publish a package to a local registry to test that the import works.
21+
22+
```sh
23+
# start local registry
24+
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
25+
# add user and login
26+
npm adduser --registry http://127.0.0.1:4873
27+
# build package
28+
npx nx build @redhat-cloud-services/rbac-client
29+
# publish package
30+
NPM_CONFIG_REGISTRY=http://127.0.0.1:4873 npm publish --tag local ./packages/rbac
31+
```
32+
33+
Testing from package consumer perspective.
34+
35+
```sh
36+
# install package from local registry
37+
NPM_CONFIG_REGISTRY=http://127.0.0.1:4873 npm install @redhat-cloud-services/rbac-client@4.2.12-local
38+
# build
39+
NPM_CONFIG_REGISTRY=http://127.0.0.1:4873 npx tsc
40+
```
41+
1842
#### CI fails due to mismatch between package.json and package-lock.json
1943

2044
The Ubuntu 24.04 container running the Github Actions uses node 20.19.5.

0 commit comments

Comments
 (0)