Skip to content

finding(create-plugin): the scaffolded package.json declares "license": "MIT" while the generator writes no LICENSE file #8041

Description

@baozhoutao

Found while running the mandatory measurement for objectui#7524 (that card is about the emitted vitest test block; this is a different defect in the same file, deliberately left alone there).

What the generator emits. packages/create-plugin/src/templates.ts:

  • buildPackageJson writes license: 'MIT' into the generated manifest, unconditionally and without prompting the author;
  • buildPluginFiles writes nine files — package.json, tsconfig.json, vite.config.ts, vitest.setup.ts, README.md and four sources — and none of them is a LICENSE;
  • the generated manifest declares no files array, so npm pack takes the default set.

So an author who publishes a freshly scaffolded plugin ships a tarball that claims MIT and carries no licence text.

Measured on a9e6f04b4: running the real scaffolder into packages/ and then pnpm exec vitest run scripts/__tests__/ turns scripts/__tests__/package-files-exist.test.ts red with, verbatim:

@object-ui/plugin-NAME (packages/plugin-NAME) declares "license": "MIT" but has no LICENSE file

(the package name is spelled here as a placeholder word, not with angle brackets — GitHub eats those). That pin is this repo's own rule (objectui#3696), so on its own it only demonstrates the shape locally. The same tarball goes to npm for the generator's actual audience, where no gate of ours looks at it at all.

Needs triage, not a guess — two separate questions:

  1. Should the generator write a LICENSE file, or should it stop hard-coding a licence for someone else's package? It asserts MIT on an author's work without ever asking. Those two answers point in opposite directions.
  2. objectui#3647 was the identical shape inside this repo and was settled by shipping the text. Whether that answer transfers to a foreign author's package is a product decision.

Deliberately out of scope for the objectui#7524 PR: that card's dispatch ruling holds the scaffolder's published output constant, so this was recorded rather than changed.

Attribution as prose (not a footer block): generated by Claude Code, seat session session_01FhBNJcLRZLe8M87VcUgpKr.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions