Skip to content

API .d.ts is broken #800

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

Closed
tomgr opened this issue Dec 15, 2022 · 2 comments · Fixed by #801
Closed

API .d.ts is broken #800

tomgr opened this issue Dec 15, 2022 · 2 comments · Fixed by #801
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@tomgr
Copy link

tomgr commented Dec 15, 2022

Due to the recent change to api.ts to import IPublishOptions and IPackageOptions from publish and package, the api.d.ts file that is shipped with the npm package needs to import the publish and package files:

import { IPublishOptions as _IPublishOptions } from './publish';
import { IPackageOptions } from './package';

However, the publish.d.ts and package.d.ts files are not included in the shipped npm package (see https://www.npmjs.com/package/@vscode/vsce/v/2.15.0?activeTab=explore) because they are excluded in the .npmignore file which includes:

out/**/*.d.ts
!out/api.d.ts

This makes it difficult to use @vscode/vsce as a library.

I'm not sure what the intention is now - if you want to only export the required .d.ts files I guess you need to work out all the .d.ts files that are imported from api.d.ts file recursively, but this is a bit fragile. It might be best to remove this exclusion all together now?

@joaomoreno joaomoreno self-assigned this Dec 15, 2022
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Dec 15, 2022
@joaomoreno joaomoreno added this to the January 2023 milestone Dec 15, 2022
@joaomoreno joaomoreno changed the title .npmignore file is incorrect API is incorrect Dec 15, 2022
@joaomoreno joaomoreno changed the title API is incorrect API .d.ts is broken Dec 15, 2022
joaomoreno added a commit that referenced this issue Dec 15, 2022
joaomoreno added a commit that referenced this issue Dec 21, 2022
* use api-extractor

fixes #800

* run `npm audit fix`

* 2.15.1

* bump ts-node

* fix build
@tomgr
Copy link
Author

tomgr commented Dec 21, 2022

Thanks for the quick fix!

@lszomoru
Copy link
Member

Verified through code review and author feedback.

@lszomoru lszomoru added the verified Verification succeeded label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants