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(tools): use commonjs in bump-package-version.js #3699

Merged
merged 2 commits into from
Apr 16, 2019

Conversation

tkrugg
Copy link
Contributor

@tkrugg tkrugg commented Apr 16, 2019

Summary

It seems before 9296639 the script was run in developement env with no modules setting, which mean it defaulted to the poorly documented auto. https://babeljs.io/docs/en/babel-preset-env#modules

Looking at their codebase it seems auto is simply commonjs. This explains why it worked before.

https://github.com/babel/babel/blob/8ca99b9f0938daa6a7d91df81e612a1a24b09d98/packages/babel-preset-env/src/module-transformations.js#L6

We could have used BABEL_ENV=cjs in front of the babel-node command but
I've moved this file to cjs as it's more simple and is consistent with
other release scripts.

It seems before 9296639 the script was
run in developement env with no modules setting, which mean it defaulted
to the poorly documented `auto`.
Looking at their codebase it seems `auto` is simply `commonjs`.  This
explains why it worked before.

We could have used BABEL_ENV=cjs in front of the babel-node command but
I've moved this file to cjs as it's more simple and is consistent with
other release scripts.
@tkrugg tkrugg force-pushed the fix/commonjs-in-bump-package-version branch from 77ecc56 to 199b9f0 Compare April 16, 2019 16:12
@algobot
Copy link
Contributor

algobot commented Apr 16, 2019

Deploy preview for instantsearchjs ready!

Built with commit 77ecc56

https://deploy-preview-3699--instantsearchjs.netlify.com

Copy link
Member

@francoischalifour francoischalifour left a comment

Choose a reason for hiding this comment

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

We can remove babel-node (@babel/node) all together. It was introduced in 453dc21.

@algobot
Copy link
Contributor

algobot commented Apr 16, 2019

Deploy preview for instantsearchjs ready!

Built with commit f5e1437

https://deploy-preview-3699--instantsearchjs.netlify.com

@tkrugg tkrugg merged commit 6a6dbe1 into develop Apr 16, 2019
@francoischalifour francoischalifour deleted the fix/commonjs-in-bump-package-version branch April 16, 2019 16:37
tkrugg added a commit that referenced this pull request Apr 17, 2019
# [3.4.0](v3.3.0...v3.4.0) (2019-04-17)

### Bug Fixes

* **storybook:** fix Hierarchical menu separator in Breadcrumb story ([#3695](#3695)) ([b3bf8ac](b3bf8ac))
* **tools:** use commonjs in bump-package-version.js ([#3699](#3699)) ([6a6dbe1](6a6dbe1))
* **types:** fix wrong typing in getWidgetState ([#3693](#3693)) ([b3c2154](b3c2154))
* **types:** remove unused Without type ([#3694](#3694)) ([656d000](656d000))

### Features

* **infiniteHits:** add previous button ([#3675](#3675)) ([2e6137b](2e6137b))
* **Insights:** Insights inside Instantsearch ([#3598](#3598)) ([387f41f](387f41f))
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.

3 participants