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

jsteinich merged 3 commits into
open-constructs:mainfrom
gabegorelick:verdaccio-package-json

Conversation

@gabegorelick

@gabegorelick gabegorelick commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

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 Resolved
Comment thread test/local-registry.sh Resolved
Comment thread test/local-registry.sh Resolved
@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

@X-Guardian X-Guardian left a comment

Copy link
Copy Markdown
Contributor

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 Resolved
Comment thread test/local-registry.mjs Resolved
@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

so0k commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

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 Resolved
@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>
@gabegorelick gabegorelick mentioned this pull request Jun 7, 2026
5 of 8 tasks
gabegorelick added a commit to gabegorelick/cdk-terrain that referenced this pull request Jun 7, 2026
We currently run verdaccio by spawning an `npm run` process. But since
`local-registry` is a JS file now (open-constructs#202), we can just call verdaccio's
JS API directly.

See open-constructs#202 (comment)
@gabegorelick
gabegorelick deleted the verdaccio-package-json branch June 7, 2026 05:09
gabegorelick added a commit to gabegorelick/cdk-terrain that referenced this pull request Jun 10, 2026
We currently run verdaccio by spawning an `npm run` process. But since
`local-registry` is a JS file now (open-constructs#202), we can just call verdaccio's
JS API directly.

See open-constructs#202 (comment)
jsteinich pushed a commit that referenced this pull request Jun 10, 2026
We currently run verdaccio by spawning an `npm run` process. But since
`local-registry` is a JS file now (#202), we can just call verdaccio's
JS API directly.

See
#202 (comment)

<!--

Unless this is a very simple 1-line-of-code change, please create a new
issue describing the change you're proposing first, then link to it from
this PR.

Read more about our process in our contributing guide:
https://github.com/open-constructs/cdk-terrain/blob/main/CONTRIBUTING.md

-->

### Related issue

Fixes # <!-- INSERT ISSUE NUMBER -->

### Description

In plain English, describe your approach to addressing the issue linked
above. For example, if you made a particular design decision, let us
know why you chose this path instead of another solution.

### Checklist

- [x] I have updated the PR title to match [CDKTN's style
guide](https://github.com/open-constructs/cdk-terrain/blob/main/CONTRIBUTING.md#pull-requests-1)
- [x] I have run the linter on my code locally
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the
[documentation](https://github.com/open-constructs/cdk-terrain-docs/tree/main/content)
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
- [x] New and existing unit tests pass locally with my changes

<!-- If this is still a work in progress, feel free to open a draft PR
until you're able to check off all the items on the list above -->
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants