Skip to content

Commit

Permalink
fix: handle babel-preset-env 7.4.3
Browse files Browse the repository at this point in the history
`[email protected]` has changed the format of how default exports
are generated. This change makes sure the tests pass with the dependency
upgraded.

closes 59naga#73
  • Loading branch information
TheLudd committed Apr 4, 2019
1 parent e8e5be0 commit d5ed346
Show file tree
Hide file tree
Showing 3 changed files with 500 additions and 371 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"postversion": "git push --follow-tags && conventional-github-releaser -p angular"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/core": "^7.4.3",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/preset-env": "^7.4.3",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.6",
"babel-plugin-rewire": "^1.1.0",
"babel-plugin-rewire": "^1.2.0",
"babel-plugin-transform-export-extensions": "^6.22.0",
"babel-preset-env": "^1.7.0",
"babel-preset-power-assert": "^2.0.0",
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ class ExportsFinder {
}

const objectName = path.get(`${property}.left.object.name`).node
const propertyName = path.get(`${property}.left.property.name`).node
const propertyName =
path.get(`${property}.left.property.name`).node ||
path.get(`${property}.left.property.value`).node
if (objectName === 'exports' || objectName === '_exports') {
if (propertyName === 'default') {
this.hasExportsDefault = true
Expand Down
Loading

0 comments on commit d5ed346

Please sign in to comment.