Skip to content

chore(tests): add verdaccio to package.json#202

Merged
jsteinich merged 3 commits into
open-constructs:mainfrom
gabegorelick:verdaccio-package-json
Jun 2, 2026
Merged

chore(tests): add verdaccio to package.json#202
jsteinich merged 3 commits into
open-constructs:mainfrom
gabegorelick:verdaccio-package-json

Conversation

@gabegorelick
Copy link
Copy Markdown
Contributor

@gabegorelick gabegorelick commented May 24, 2026

We were installing it via npx, which means its dependencies weren't pinned. In the age of supply chain attacks, that's not great.

Related issue

Fixes #

Description

Add verdaccio to test/package.json

Checklist

  • I have updated the PR title to match CDKTN's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

Comment thread test/local-registry.sh Outdated
Comment thread test/local-registry.sh Outdated
Comment thread test/local-registry.sh Outdated
@gabegorelick gabegorelick force-pushed the verdaccio-package-json branch 2 times, most recently from 99c2345 to 1447b4a Compare May 24, 2026 03:22
@gabegorelick gabegorelick marked this pull request as ready for review May 24, 2026 03:36
@gabegorelick gabegorelick requested a review from a team as a code owner May 24, 2026 03:36
Copy link
Copy Markdown
Contributor

@X-Guardian X-Guardian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've actually already included this change in #170, but took it further and re-wrote the local-registry.sh script in javascript and enhanced the verdaccio process handling. Happy to split this out, as #170 is getting very large.

How about we include the local-registry change from #170 in this PR? I have refined it to also resolve #199.

Comment thread test/local-registry.mjs
Comment thread test/local-registry.mjs
@gabegorelick gabegorelick force-pushed the verdaccio-package-json branch from ad3b51f to 0c2ea8c Compare May 25, 2026 02:56
@gabegorelick
Copy link
Copy Markdown
Contributor Author

How about we include the local-registry change from #170 in this PR?

@X-Guardian Done.

@so0k so0k force-pushed the verdaccio-package-json branch from 0c2ea8c to afc3e5d Compare May 25, 2026 03:24
@so0k
Copy link
Copy Markdown
Contributor

so0k commented May 25, 2026

seems tests are still failing after rebase

   SYNTH_HCL_OUTPUT: false
...
Cleaning storage dir (/__w/cdk-terrain/cdk-terrain/test/storage)..
Verdaccio Registry log file: /tmp/verdaccio-OH0GZw/verdaccio.log
Waiting for local Registry to start
Verdaccio exited before becoming ready (code=127, signal=null).
--- verdaccio log (tail) ---
sh: 1: verdaccio: not found

----------------------------
Error: Process completed with exit code 1.

@gabegorelick
Copy link
Copy Markdown
Contributor Author

sh: 1: verdaccio: not found

@X-Guardian any ideas why we'd see this only for some tests?

@X-Guardian
Copy link
Copy Markdown
Contributor

We need to install the test dependencies as part of the examples integration test workflow. See https://github.com/open-constructs/cdk-terrain/pull/170/changes#diff-8906835152921ef903f55779586f3a092362f65fca98df94d71801cf974ec95bR141-R142

      - name: Install test dependencies
        run: cd test && yarn install --frozen-lockfile --prefer-offline

@gabegorelick gabegorelick force-pushed the verdaccio-package-json branch from afc3e5d to 5780662 Compare May 26, 2026 01:25
@gabegorelick
Copy link
Copy Markdown
Contributor Author

We need to install the test dependencies as part of the examples integration test workflow.

Thanks, updated. Let's see if that's enough to fix all the errors. 🤞

Comment thread test/local-registry.mjs
@X-Guardian
Copy link
Copy Markdown
Contributor

@gabegorelick, it would be great to get this merged if you could resolve the conflicts.

We were installing it via npx, which means its dependencies weren't
pinned. In the age of supply chain attacks, that's not great.
@gabegorelick gabegorelick force-pushed the verdaccio-package-json branch from 5780662 to ef38063 Compare June 1, 2026 16:05
@gabegorelick
Copy link
Copy Markdown
Contributor Author

it would be great to get this merged if you could resolve the conflicts.

Done. Conflicts are resolved.

@jsteinich jsteinich merged commit 42613ce into open-constructs:main Jun 2, 2026
258 checks passed
so0k added a commit that referenced this pull request Jun 5, 2026
## 0.23.3

### chore

- chore(gha): run integration tests on Depot runners
[\#238](#238)
- chore(deps): bump typescript to 5.9.3 across the repo
[\#231](#231)
- chore: Upgrade jsii
[\#223](#223)
- chore: Revise README links to documentation and language support
[\#221](#221)
- chore: Pin node version to 22.22.2 via .nvmrc
[\#212](#212)
- chore: Add gradle cache to the examples and integration CI workflows
[\#211](#211)
- chore: Add PR workflow concurrency group and CI Label Filter job
[\#204](#204)
- chore(tests): add verdaccio to package.json
[\#202](#202)
- chore(tests): don't require other language builds
[\#201](#201)
- chore(tests): Ensure we terminate Verdaccio
[\#199](#199)
- chore: rewrite https://cdk.tf links
[\#197](#197)
- chore: Update examples help files
[\#194](#194)

### feat

- feat: faster JSON stringify
[\#224](#224)
- feat(lib): allow disabling creation stacks
[\#215](#215)

### fix

- fix(lib): surface stderr/stdout on exec() failures via toString()
[\#207](#207)

---------

Co-authored-by: so0k <vincent.drl@gmail.com>
Co-authored-by: sakul-learning <lucas@sheesh.host>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants