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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic support for esm #914

Merged
merged 7 commits into from
Aug 24, 2020
Merged

Conversation

jeetiss
Copy link
Contributor

@jeetiss jeetiss commented Aug 18, 2020

hey @eunjae-lee!
how are you? 馃檶馃徎

I mirgate same of my project to esm modules with "type": "module", so now i can't use shipjs, because it load only shipjs.config.js
I added cjs, mjs, js possible extensions to config and use first existed, so it should solve the problem

also improve config for tests 鉂わ笍

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

implementation looks good overall, and since we process with babel, cjs & mjs should both work as expected.

What do you think of adding a more "integration-like" test which actually uses a real config file?

packages/shipjs-lib/src/lib/config/loadConfig.js Outdated Show resolved Hide resolved
packages/shipjs-lib/src/lib/config/loadConfig.js Outdated Show resolved Hide resolved
packages/shipjs-lib/src/lib/util/getAppName.js Outdated Show resolved Hide resolved
packages/shipjs-lib/src/lib/util/getAppName.js Outdated Show resolved Hide resolved
@jeetiss
Copy link
Contributor Author

jeetiss commented Aug 18, 2020

hello @Haroenv, thanks for review 馃檶馃徎

since we process with babel, cjs & mjs should both work as expected.

Babel doesn't handle dynamically imported/required files, so it isn't working with with shipjs config file now.

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

I think this is good to go

@Haroenv
Copy link
Contributor

Haroenv commented Aug 18, 2020

CircleCI is down today I think

@jeetiss
Copy link
Contributor Author

jeetiss commented Aug 20, 2020

@Haroenv CircleCI isn't run test for PR from forks
Any chance that this PR will be released on this week?

@Haroenv
Copy link
Contributor

Haroenv commented Aug 20, 2020

I'll leave the merging to @eunjae-lee, he's back next week

Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you @jeetiss

@eunjae-lee eunjae-lee merged commit 42918d5 into algolia:main Aug 24, 2020
@eunjae-lee
Copy link
Contributor

@jeetiss released in 0.21.0 馃帀

@jeetiss jeetiss deleted the support-cjs-config branch August 24, 2020 14:43
@jeetiss
Copy link
Contributor Author

jeetiss commented Aug 24, 2020

@eunjae-lee thanks 馃檶馃徎

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

Successfully merging this pull request may close these issues.

None yet

3 participants