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(babel-core): add missing extension to package.json dependency #6524

Merged
merged 1 commit into from Oct 21, 2017

Conversation

@alexjoverm
Copy link
Contributor

alexjoverm commented Oct 21, 2017

Q                       A
Fixed Issues?
Patch: Bug Fix? 👍
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR
Any Dependency Changes? No

Not having the .json extension makes TypeScript to fail when requiring this file. That's by definition in TypeScript.

That's reproducible easily using this repo. If you follow the steps you'll see this error:

Cannot find module '../../package' from 'node.js'
      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:191:17)
      at Object.<anonymous> (node_modules/babel-core/lib/api/node.js:60:16)

This PR fixes the issue by adding the extension.

@babel-bot

This comment has been minimized.

Copy link
Collaborator

babel-bot commented Oct 21, 2017

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5437/

@babel babel deleted a comment from babel-bot Oct 21, 2017
@Andarist

This comment has been minimized.

Copy link
Member

Andarist commented Oct 21, 2017

As this is a simple change - I'm merging this right away. Thanks for the PR!

@Andarist Andarist merged commit 39d05da into babel:master Oct 21, 2017
4 checks passed
4 checks passed
babel/repl REPL preview is available
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 86.97% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
martijnthe pushed a commit to martijnthe/ts-jest that referenced this pull request Nov 12, 2017
… to avoid hitting "Cannot find module '../../package' from 'node.js'" error

- Change scripts/tests.js to copy the package sources, replacing the require('../../../../etc') hack (which for some reason caused kulshekhar#367 not to trip!?)
martijnthe pushed a commit to martijnthe/ts-jest that referenced this pull request Nov 12, 2017
… to avoid hitting "Cannot find module '../../package' from 'node.js'" error

- Change scripts/tests.js to copy the package sources, replacing the require('../../../../etc') hack (which for some reason caused kulshekhar#367 not to trip!?)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.