Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create markdown table skeleton for initial package.json fields #21

Open
rxmarbles opened this issue Jun 4, 2024 · 5 comments
Open

Create markdown table skeleton for initial package.json fields #21

rxmarbles opened this issue Jun 4, 2024 · 5 comments
Labels

Comments

@rxmarbles
Copy link
Collaborator

rxmarbles commented Jun 4, 2024

*Open Inventory and Analysis” issue to start research process async across stakeholders.

Let’s make a place (doc, wiki, issue) that can list all known package.json fields. For each field, let’s link to all of the places (package managers, tools, platforms, etc) that document semantics/usage of it. To better populate that list of fields, we should audit the docs of known package managers/tools/platforms/etc to ensure we’re not missing anything. This work can be fully parallelized and done async, and set up so that anyone can arbitrarily pick a field to research and flesh out.

Let’s model things after https://github.com/mdn/browser-compat-data - with the intent to hopefully PR the data in there when it’s mostly complete, but whether they want the data or not, we can benefit from their data schema design.

First steps: make a markdown file in the collab space repo with a skeleton so people can PR in fields and research results.

Desired stakeholders:

  • npm
  • pnpm
  • yarn
  • vlt
  • cnpm
  • corepack
  • node
  • bun
  • deno
  • bundlers (browserify, webpack, esbuild, etc)
  • version managers (volta, asdf, mise, etc)
@ljharb ljharb added help wanted Extra attention is needed package-metadata-agenda labels Jun 4, 2024
@nektro
Copy link

nektro commented Jun 4, 2024

WIP

Bun package manager

  • name (string)
  • version (string)
  • bin{string -> string}
  • bin (string)
  • directories.bin (string)
  • scripts{string -> string}
  • scripts.preinstall (string)
  • scripts.install (string)
  • scripts.postinstall (string)
  • scripts.preprepare (string)
  • scripts.prepare (string)
  • scripts.postprepare (string)
  • peerDependenciesMeta[pkgname].optional (bool)
  • workspaces (relativepath[])
  • workspaces.packages (relativepath[]) (yarn compatibility)
  • dependencies[pkgname -> version]
  • devDependencies[pkgname -> version]
  • optionalDependencies[pkgname -> version]
  • peerDependencies[pkgname -> version]
  • trustedDependencies (pkgname[]) https://bun.sh/docs/install/lifecycle#trusteddependencies
  • overrides[pkgname -> version] https://bun.sh/docs/install/overrides#overrides
  • resolutions[pkgname -> version] https://bun.sh/docs/install/overrides#resolutions

pkgname, relativepath, version used above are all strings

Bun runtime

Bun bundler

Bun test runner

Uncategorized

  • client
  • fallback
  • css
  • override
  • define
  • define.client
  • define.fallback
  • define.server
  • server
  • framework
  • framework.displayName
  • framework.static (string)
  • framework.assetPrefix (string)
  • framework.router.dir (string)
  • framework.router.dir (string[])
  • framework.router.extensions (string[])
  • framework.development.static (string)
  • framework.production.static (string)
  • type ("commonjs" | "module")
  • main (string)
  • module (string)
  • browser (string)
  • jsnext:main (string)
  • browser{string -> string}
  • exports
  • imports
  • sideEffects

@nektro
Copy link

nektro commented Jun 6, 2024

@Ethan-Arrowood
Copy link
Collaborator

I believe this idea is similar to my intent with: https://github.com/openjs-foundation/package-json-research

@nektro
Copy link

nektro commented Jul 10, 2024

@reggi
Copy link

reggi commented Sep 25, 2024

npm also has this typescript definition here: https://github.com/npm/types/blob/main/types/index.d.ts#L90-L129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants