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

Add missing index.ts #886

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Add missing index.ts #886

merged 1 commit into from
Jul 31, 2024

Conversation

mattwebbio
Copy link
Contributor

The package.json has "exports": "./dist/index.js", but no actual index.ts or index.js exists.

This commit adds that file, in the same format as the one in plugin-plugins: https://github.com/oclif/plugin-plugins/blob/main/src/index.ts

This file is necessary for extending functionality of the <cli> update command by extending it. Prior to the ESM migration, this could have been done like so:

import SuperUpdate from '@oclif/plugin-update/dist/commands/update'

export default class Update extends SuperUpdate {

With the change in this commit, this would now be done like so:

import {commands} from '@oclif/plugin-update'

export default class Update extends commands['update'] {

The `package.json` has ` "exports": "./dist/index.js"`, but no actual `index.ts` or `index.js`
exists.

This commit adds that file, in the same format as the one in `plugin-plugins`:
https://github.com/oclif/plugin-plugins/blob/main/src/index.ts
@mdonnalley mdonnalley merged commit 2a43c81 into oclif:main Jul 31, 2024
2 checks passed
@mdonnalley
Copy link
Contributor

Thanks for the contribution @mattwebbio

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

Successfully merging this pull request may close these issues.

2 participants