Commit Graph

37 Commits

Author SHA1 Message Date
renovate[bot] 2bc7595dfa chore(deps): update dependency snyk-nodejs-lockfile-parser to v2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-11 12:41:43 +00:00
github-actions[bot] 4bd6a3a1af Version Packages (next) 2026-02-24 19:24:06 +00:00
github-actions[bot] e6df5d52ce Version Packages 2026-02-17 16:06:18 +00:00
github-actions[bot] d4b85dddee Version Packages (next) 2026-01-27 15:51:11 +00:00
github-actions[bot] c24788d5bb Version Packages 2025-12-16 14:08:20 +00:00
github-actions[bot] 756986e5e7 Version Packages (next) 2025-11-25 16:21:32 +00:00
Riley Martine 6474b04936 Add detail in error messages when yarn plugin can't detect backstage version
I was confused for ~15 minutes today when updating to using the yarn
plugin. It was failing in docker but not locally, and I didn't know why.
It turned out to be because I forgot to copy the backstage.json into the
docker image. This was confusing, because the error seemed to indicate I
was failing the semver checks. This change propagates error detail down
the line, so people will see the actual cause. (i.e. missing file, no
version field, semver wrong)

Signed-off-by: Riley Martine <rmartine@integralads.com>
2025-09-03 14:58:40 -06:00
github-actions[bot] 9a7cae26c9 Version Packages 2025-07-15 14:26:41 +00:00
github-actions[bot] 952cefedd8 Version Packages (next) 2025-07-01 11:50:02 +00:00
github-actions[bot] 58558ef2c1 Version Packages 2025-06-17 12:45:56 +00:00
Cory Steers 348f82edd2 Merge branch 'master' into address_yarn_add 2025-06-16 10:03:24 -05:00
Cory Steers a0f9e4efce first cut at addressing bug with adding backstage dependencies to a package maintained by the backstage plugin
Signed-off-by: Cory Steers <cory.steers.gmu9@statefarm.com>
2025-05-29 15:21:37 -05:00
github-actions[bot] 389d265b60 Version Packages 2025-05-20 08:25:02 +00:00
github-actions[bot] 1c0cb7be17 Version Packages (next) 2025-05-13 13:52:18 +00:00
github-actions[bot] ce2cf32847 Version Packages (next) 2025-04-22 12:36:56 +00:00
Vincenzo Scamporlino d67ea76f04 yarn-plugin: update deps and patch @yarnpkg/plugin-npm
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-22 13:41:11 +02:00
MT Lewis fd70d8661e yarn-plugin: include both backstage: and npm:
ranges in lockfile

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2025-04-22 13:40:47 +02:00
MT Lewis 3ebbc6b48f yarn-plugin: add failing test for snyk lockfile parsing issue
A recent change reintroduced the issue previously
fixed by #27727. To ensure this doesn't regress
again, I'm introducing a test that specifically
checks that lockfile parsing works as expected.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2025-04-22 13:40:25 +02:00
MT Lewis 43566de4e9 yarn-plugin: add integration test suite
The new test suite fully exercises the plugin,
including onboarding and offboarding from the
plugin and the effect on lockfiles.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2025-01-07 12:31:45 +00:00
github-actions[bot] cfdf107d34 Version Packages 2024-12-17 10:54:05 +00:00
MT Lewis ac91864de3 yarn-plugin: rewrite using reduceDependency hook
Switching to using the reduceDependency hook
simplifies the plugin, since we can do all the
work in one go. It also means that the yarn.lock
file doesn't need to change when adding and
removing the yarn plugin, which avoids
unintentionally unlocking packages versions.

As part of this change, the descriptor emitted by
the plugin has been changed from
`npm:<manifest-version>` to
`npm:^<manifest-version>`, to match the range
emitted when packing packages. This ensures good
interoperability with the `backstage-cli
build-workspace`, which packs packages into a new
workspace and copies yarn.lock across.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-12-16 20:04:17 +00:00
github-actions[bot] d8f9e72384 Version Packages (next) 2024-12-03 13:18:49 +00:00
MT Lewis 48cc7c5245 yarn-plugin: use yarn's httpUtils to fetch release manifests
This allows us to leverage yarn's built in proxy
configuration when making the request. The yarn
HTTP utilities handle caching of GET
requests, so we can remove our memoization of the
request, too.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-12-01 18:11:45 +00:00
github-actions[bot] b86975e7fb Version Packages (next) 2024-11-26 11:10:07 +00:00
MT Lewis 27600c2cd3 yarn-plugin: import appropriate type to verify beforeWorkspacePacking signature
I realised that by default the `Plugin` type from
`@yarnpkg/core` sets the type of the `hooks`
property to `any`. This meant that there wasn't
any restriction on the hooks that could be passed,
and introduced the risk that a typo in the
`beforeWorkspacePacking` name could lead to the
hook being skipped.

This commit pulls in the appropriate type for
Hooks to verify the name and signature of the hook.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-11-22 17:03:42 +00:00
MT Lewis 9296a33c4d yarn-plugin: remove dependency on chalk
Chalk costs us about 20kb in the bundle size, and
we only use it to format one logged message. To
avoid this dependency, this commit hard-codes the
escape codes for that single message.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-11-22 14:51:01 +00:00
github-actions[bot] 1552f03186 Version Packages 2024-11-19 11:21:20 +00:00
github-actions[bot] 7ffb8eedd7 Version Packages (next) 2024-10-28 13:06:13 +00:00
github-actions[bot] 698adeb1ea Version Packages 2024-09-17 13:19:01 +00:00
MT Lewis b207f69ba1 yarn-plugin: memoize manifest fetching
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-07-27 14:10:15 +01:00
MT Lewis a8bd40162c yarn-plugin: validate version of yarn in yarn plugin
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-07-11 12:10:10 +01:00
github-actions[bot] 18a40424cb Version Packages 2024-06-18 12:37:38 +00:00
github-actions[bot] e83ead9b1a Version Packages (next) 2024-06-11 15:25:17 +00:00
MT Lewis 573e98b352 yarn-plugin: use findPaths from cli-common instead of custom findWorkspaceRoot implementation
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-06-04 17:03:59 +01:00
MT Lewis c24bc371eb yarn-plugin: add unit tests
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-06-04 17:03:57 +01:00
MT Lewis 612d471d29 yarn-plugin: handle packing step
This commit introduces a beforeWorkspacePacking
hook which converts `backstage:` versions back
into `npm:`` versions when packages are packed for
publish. This allows the `backstage:` protocol to
be used even for packages that are intended to
themselves be published (such as packages in
third-party Backstage plugin monorepos outside
core).

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-06-04 17:03:56 +01:00
MT Lewis eaa7500130 yarn-plugin: add initial version of plugin
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-06-04 17:03:54 +01:00