Fix package.json entry points across all packages - #987
Open
theoephraim wants to merge 1 commit into
Open
Conversation
- varlock: main pointed at a nonexistent top-level index.js - 15 plugins: main/types pointed at dist/index.js + dist/index.d.ts, which the plugin builds never emit (only dist/plugin.cjs) - declare import/require conditions explicitly instead of relying on a bare default, so module-format detection sees the real format - add missing types conditions for nextjs integration subpath exports
Contributor
|
The changes in this PR will be included in the next version bump.
|
Contributor
📦 Bundle size
dist/ only; native binaries are versioned separately and not counted here. |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed all package entry-point updates in commit 376e97e2, including their emitted artifacts and runtime and type resolution paths.
- Varlock conditions: Corrects top-level entry points, adds explicit ESM
importconditions, and marks the two self-contained CommonJS runtime bundles withrequireconditions while preservingdefaultfallbacks. - Integration conditions: Adds explicit ESM conditions to CI, Astro, Cloudflare, and Vite packages, and adds typed CommonJS conditions to every Next.js integration export.
- Parser declarations: Adds the legacy top-level TypeScript declaration target for
@env-spec/parser. - Plugin cleanup: Removes nonexistent root entry points from 15 plugin manifests while preserving the loader-consumed
./pluginstring export. - Release metadata: Adds patch bumps for all affected publishable packages.
azure/gpt-5.6-sol | 𝕏
@varlock/ci-env-info
@env-spec/parser
varlock
@varlock/astro-integration
@varlock/cloudflare-integration
@varlock/nextjs-integration
@varlock/vite-integration
@varlock/1password-plugin
@varlock/akeyless-plugin
@varlock/aws-secrets-plugin
@varlock/azure-key-vault-plugin
@varlock/bitwarden-plugin
@varlock/dashlane-plugin
@varlock/doppler-plugin
@varlock/google-secret-manager-plugin
@varlock/hashicorp-vault-plugin
@varlock/infisical-plugin
@varlock/keeper-plugin
@varlock/kubernetes-plugin
@varlock/pass-plugin
@varlock/passbolt-plugin
@varlock/proton-pass-plugin
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Prompted by npmx-dev/npmx.dev#2837, where
varlockshows up as CJS. Auditing every path referenced from everypackage.jsonturned up 33 dangling references across the monorepo.What was wrong
Dead entry points.
varlockhad"main": "index.js", pointing at a file that has never existed. 15 plugin packages had"main": "dist/index.js"and"types": "dist/index.d.ts", neither of which their builds emit (the only artifact isdist/plugin.cjs).Bare
defaultconditions. Most exports useddefaultrather than namingimport/require. npmx's detection walks the exports tree, setshasRequireif any string ends in.cjs, and never consultstype: module. Our./init-serverand./init-edgeare genuinely CJS, so with noimportcondition anywhere the whole package got classifiedcjs.Changes
varlock-mainnow points at./dist/index.js, added top-leveltypes. Explicitimporton the 12 ESM subpaths, explicitrequireon the two.cjsones.defaultis kept everywhere as the fallback, so resolution behavior is unchanged.main/typesthat pointed at files the build never produces. Their./pluginexport stays a plain string, sinceEnvGraphPlugin.pluginFilePathreads it as one.ci-env-info,vite,cloudflare,astro- explicitimportconditions; astro's bare string export expanded to carrytypes.nextjs- subpath exports had notypesat all, so@varlock/nextjs-integration/pluginand friends resolved untyped. Now explicittypes/require/default.env-spec-parser- added top-leveltypes.Verification
Full build,
turbo test:ci(8/8 packages, 2071 tests),turbo typecheck(26/27;varlock-docs-mcpfails on missing Cloudflare Worker types, pre-existing onmain). Plus a resolver probe running all 14varlocksubpaths through Node under bothimport.meta.resolveandrequire.resolve- all resolve, unchanged from before.Note on the badge
npmx will now report
varlockasdualrather thancjs. It can't reach plainesmwhileinit-server/init-edgeare exported as.cjs, and those genuinely are CJS. Dropping them fromexportswould break the resolution contract with older@varlock/nextjs-integration, so they stay. Their heuristic ignoringtype: modulewhendefaultis used is still a bug on their end; the issue stays open.