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

fix: internal packages now takes suffix and esm opt. #616

Merged
merged 1 commit into from
Jul 16, 2022

Conversation

DevSlashRichie
Copy link
Contributor

This PR fixes: #615

src/utils.ts Outdated Show resolved Hide resolved
@DevSlashRichie
Copy link
Contributor Author

I'll fix the lint.

@paralin
Copy link
Collaborator

paralin commented Jul 15, 2022

@siendoricardo Squashed your commits to 1 commit & added some more info in the commit description, also fixed some CI errors (ran yarn run prettier)

@stephenh This looks good to me.

Add a new impFile function which uses the importSuffix to import.

Use impFile for protobufjs/minimal such that;

If importSuffix='.js' then:

import * as _m1 from 'protobufjs/minimal.js';

Fixes esmodule interop.

Adjust ts-poet options to fix importing the default module from
protobufjs/minimal.js if necessary.
Copy link
Owner

@stephenh stephenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @paralin and @siendoricardo !

@stephenh stephenh merged commit b86291c into stephenh:main Jul 16, 2022
stephenh pushed a commit that referenced this pull request Jul 16, 2022
## [1.117.1](v1.117.0...v1.117.1) (2022-07-16)

### Bug Fixes

* import protobufjs/minimal with importSuffix ([#616](#616)) ([b86291c](b86291c))
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.117.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

ESM packages still not working because of protobufjs/minimal
3 participants