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

bump up babel version #61037

Merged
merged 6 commits into from
Mar 25, 2020
Merged

bump up babel version #61037

merged 6 commits into from
Mar 25, 2020

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Mar 24, 2020

Summary

A prerequisite for TypeScript update #57774
I didn't add onlyRemoveTypeImports which should be done in ^^^

//packages/kbn-babel-preset/common_preset.js
[
  require.resolve('@babel/preset-typescript'),
  { allowNamespaces: true, onlyRemoveTypeImports: true },
],

more details babel/babel#11173, babel/babel#10981, babel/babel#11171

Testing locally might require yarn kbn clean

@mshustov mshustov added chore release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.8.0 labels Mar 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@mshustov mshustov mentioned this pull request Mar 24, 2020
7 tasks
@mshustov mshustov marked this pull request as ready for review March 24, 2020 10:08
@mshustov mshustov requested review from a team as code owners March 24, 2020 10:08
@mshustov mshustov added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Mar 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

kbn-analytics package babel version bump lgtm

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

I'm getting errors when bootstrapping it:

 succ [@elastic/datemath] cache up to date
 succ [@kbn/config-schema] cache up to date
 succ [@kbn/utility-types] cache up to date
 succ [@kbn/dev-utils] cache up to date
@kbn/babel-code-parser: $ yarn build --quiet
@kbn/babel-code-parser: $ babel src --out-dir target --quiet
✖ @kbn/babel-code-parser: { Error: [BABEL] /Users/afharo/Developer/kibana/packages/kbn-babel-code-parser/src/can_require.js: Cannot find module 'lodash/clone'\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:562:25)\n    at Module.require (internal/modules/cjs/loader.js:692:17)\n    at require (internal/modules/cjs/helpers.js:25:18)\n    at Object.<anonymous> (/Users/afharo/Developer/kibana/node_modules/@babel/plugin-transform-typescript/node_modules/@babel/types/lib/builders/builder.js:8:37)\n    at Module._compile (internal/modules/cjs/loader.js:778:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\n    at Module.load (internal/modules/cjs/loader.js:653:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }
@kbn/babel-code-parser: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
✖ @kbn/babel-code-parser: error Command failed with exit code 1.
@kbn/babel-code-parser: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
✖ @kbn/babel-code-parser: error Command failed with exit code 1.

[bootstrap] failed:

Error: Command failed with exit code 1: yarn run kbn:bootstrap
{ Error: [BABEL] /Users/afharo/Developer/kibana/packages/kbn-babel-code-parser/src/can_require.js: Cannot find module 'lodash/clone'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/Users/afharo/Developer/kibana/node_modules/@babel/plugin-transform-typescript/node_modules/@babel/types/lib/builders/builder.js:8:37)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }
error Command failed with exit code 1.
error Command failed with exit code 1.
$ yarn build --quiet
$ babel src --out-dir target --quiet
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    at makeError (/Users/afharo/Developer/kibana/packages/kbn-pm/dist/index.js:33441:11)
    at handlePromise (/Users/afharo/Developer/kibana/packages/kbn-pm/dist/index.js:32377:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
➜  kibana git:(bump-babel)

@@ -47554,7 +47554,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(562);
Copy link
Member

@afharo afharo Mar 24, 2020

Choose a reason for hiding this comment

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

isn't it interesting the dist/ dir is pushed to GitHub?

Unrelated to this PR. Just adding a heads up to @elastic/kibana-operations 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

kbn/pm is used to install dependencies with kbn bootstrap before any node module is installed, so it has to bundle the node_modules it needs in a file that git can put in place, which is why it's committed to the repo.

@mshustov
Copy link
Contributor Author

mshustov commented Mar 24, 2020

@afharo Could you run yarn kbn clean and then bootstrap?

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

Code owner changes LGTM

@afharo
Copy link
Member

afharo commented Mar 24, 2020

@afharo Could you run yarn kbn clean and then bootstrap?

cleaning first did the trick

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

Pulse changes LGTM!

@spalger
Copy link
Contributor

spalger commented Mar 24, 2020

cleaning first did the trick

yarn, why do you like to make me sad

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM, merged master and updated the transitive @babel/* deps in yarn.lock too so a clean shouldn't be necessary anymore.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@mshustov mshustov merged commit a8f92c5 into elastic:master Mar 25, 2020
@mshustov mshustov deleted the bump-babel branch March 25, 2020 15:37
mshustov added a commit to mshustov/kibana that referenced this pull request Mar 25, 2020
* bump babel version

* build kbm-pm

* refresh transitive @babel/* versions to kick yarn into shape

* update kbn/pm dist

Co-authored-by: spalger <spalger@users.noreply.github.com>
mshustov added a commit that referenced this pull request Mar 25, 2020
* bump up babel version (#61037)

* bump babel version

* build kbm-pm

* refresh transitive @babel/* versions to kick yarn into shape

* update kbn/pm dist

Co-authored-by: spalger <spalger@users.noreply.github.com>

* stop using deprecated source-map option

Co-authored-by: spalger <spalger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Operations Team label for Operations Team v7.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants