-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Incompatible with @microsoft/api-extractor (maybe pnpm?). #1513
Comments
FYI: i confirm that 4.2.0 works fine, and broke since this commit(16b6569) released. |
Hmm, OK, so it seems the parent |
I think in this specific case, providing The // import
import packageJson from 'socket.io-client/package.json';
// or
const packageJson = require('socket.io-client/package.json'); However, in tools like api-extractor, they just tryna read package.json under the same directory(only recrusive when not found) once they encountered an entry file, seems like it's a quite common case. |
Related: socketio/socket.io-client#1513 Backported from master: 6e798fb
Note: the version must be kept in sync when publishing a new release Related: #1513
The additional package.json file, which was copied to build/cjs/package.json, did hide the parent one, leading to several issues and providing no real feature. The other one, copied to build/esm/package.json, is needed though, to enforce the module type. Related: - socketio/socket.io#4194 - #1513
Note: the version must be kept in sync when publishing a new release Related: socketio/socket.io-client#1513
The additional package.json file, which was copied to build/cjs/package.json, did hide the parent one, leading to several issues and providing no real feature. The other one, copied to build/esm/package.json, is needed though, to enforce the module type. Related: - socketio/socket.io#4194 - socketio/socket.io-client#1513
This should be fixed by f56fdd0, included in Please reopen if needed. |
Describe the bug
In my project, i use @microsoft/api-extractor to rollup all d.ts into a single d.ts per package(like what vue 3.0 does).
However, when i migrate yarn to pnpm, and build my project once again, the error(snapshot above) occurs.
It it obvious that api-extractor (code here) tries to read meta info from esm/package.json (or cjs/package.json), while no
name
field found.It is neccessary not only provide
type
field but merge with the root package.json in postcompile.sh?To Reproduce
/packages/
, add socket.io-client to dependencies, thenexports * from 'socket.io-client'
in index.tsim not sure it is actually a bug of socket.io-client, or the build tools / package manager tools i used, or even it is not a bug and has walkaround?
The text was updated successfully, but these errors were encountered: