Skip to content

Conversation

@jkowalleck
Copy link
Contributor

@jkowalleck jkowalleck commented Apr 8, 2024

What's the problem this PR addresses?

resolves #6211

...

How did you fix it?

  • added a boolean CLI switch to builder build {bundle,plugin} called --metafile, defaults to false
  • if CLI switch
    • is false, then the esbuild in instructed to NOT emit metafile
    • is true, then ...
      • the esbuild in instructed to emit metafile
      • the metafile data is written to target file bundles/${name}.meta.json
      • the target file is announced in the summary
        example ourput:
        $ builder build plugin --metafile  ➤ YN0000: ┌ Building @yarnpkg/plugin-cyclonedx ➤ YN0000: └ Completed in 8s 619ms ➤ YN0000: ✓ Done building @yarnpkg/plugin-cyclonedx! ➤ YN0000: ? Bundle path: /.../cyclonedx-node-yarn/bundles/@yarnpkg/plugin-cyclonedx.js ➤ YN0000: ? Bundle size: 771.52 KiB ➤ YN0000: ? Bundle meta: /.../cyclonedx-node-yarn/bundles/@yarnpkg/plugin-cyclonedx.meta.json

...

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Copy link
Member

@merceyz merceyz left a comment

Choose a reason for hiding this comment

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

Would you be willing to add it to the bundle command as well?

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck
Copy link
Contributor Author

jkowalleck commented Apr 8, 2024

Would you be willing to add it to the bundle command as well?

sure. will push the needed changes in a minute

PS: done via 2d6d40a62c8869f0df93999be0c23e8fae50923f

as requested here: #6212 (review) Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@merceyz merceyz changed the title feat: builder build plugin --metafile feat(builder): add --metafile flag Apr 8, 2024
@jkowalleck
Copy link
Contributor Author

[x] I will check that all automated PR checks pass before the PR gets reviewed.

some tests are failing and i do not understand why.
please instruct me on how to fix them.

@merceyz
Copy link
Member

merceyz commented Apr 8, 2024

I've fixed the versions file it was complaining about, the Windows CI has been broken for a while and we haven't gotten around to fixing it yet so you can ignore that.

Copy link
Member

@merceyz merceyz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants