Remove missing package main entry#3286
Remove missing package main entry#3286Jamil Ur Rehman Ahmadzai (jamilahmadzai) wants to merge 1 commit into
Conversation
|
Hello Jamil Ur Rehman Ahmadzai (@jamilahmadzai), thank you for opening this PR. Sorry for the wall of text, but today I learned that our repos that run e2e tests require an env var called This is the reason that your PR is failing the main check with the message: This is not specific to the CLI, or your PR but it is blocking progress. Would you mind opening up a PR in the main contentful-cli repo as a stop gap? I'm investigating solutions with our team, but I don't want to yak shave on this. Also, quick question that might inform that investigation, is there a specific reason that you opted for a forked strategy? |
|
Thanks for digging into this and for explaining the CI failure. I used the forked PR flow because I do not have push access to Maintainer edits are enabled on this PR. If it helps as a stop gap, someone with write access can create an internal branch from |
|
Jamil Ur Rehman Ahmadzai (@jamilahmadzai)
I see, thank you for this insight. I was not aware of that blocker, apologies. Let me raise this with the team and figure something out. |
Summary
mainentry that points todist/contentful.jsbin.contentfulCLI entry unchangedWhy
contentful-cliis published as a CLI package, but its package metadata currently advertisesdist/contentful.jsas the package main. That file is not present in the repository or published package tarball, so consumers and package validators see a broken entry point.The CLI entry remains
bin/contentful.js, which loadsdist/lib/cli.jsafter the package build.Fixes #3285.
Validation
node -e "const p=require('./package.json'); console.log({hasMain:Object.prototype.hasOwnProperty.call(p,'main'), bin:p.bin})"npm pack --dry-run --json .package/package.jsoninspection confirmed nomainentry and unchangedbin.contentfulgit diff --check