Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
calebeby committed Jun 1, 2023
1 parent fa40033 commit 8865b9c
Show file tree
Hide file tree
Showing 10 changed files with 11,932 additions and 16,045 deletions.
5 changes: 0 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,4 @@ module.exports = {
},
moduleFileExtensions: ['js', 'md', 'ts'],
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
}
27,916 changes: 11,905 additions & 16,011 deletions package-lock.json

Large diffs are not rendered by default.

40 changes: 19 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"dist"
],
"scripts": {
"build": "rollup -c rollup.config.js",
"build:watch": "rollup --watch -c rollup.config.js",
"build": "rollup -c rollup.config.mjs",
"build:watch": "rollup --watch -c rollup.config.mjs",
"type": "tsc --noEmit",
"type:watch": "tsc --noEmit --watch",
"test": "jest",
Expand All @@ -32,25 +32,23 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.22.1",
"@changesets/changelog-github": "^0.2.7",
"@changesets/cli": "^2.10.1",
"@rollup/plugin-node-resolve": "7.1.3",
"@rollup/plugin-sucrase": "3.0.1",
"@sucrase/jest-plugin": "2.0.0",
"@types/babel__core": "^7.20.1",
"@types/babel__traverse": "^7.20.0",
"@types/jest": "25.2.1",
"@types/node": "13.13.5",
"eslint": "7.0.0",
"eslint-plugin-caleb": "9.0.0",
"jest": "26.0.1",
"jest-circus": "26.0.1",
"jest-watch-typeahead": "0.6.0",
"prettier": "2.0.5",
"rollup": "2.9.1",
"rollup-plugin-dts": "1.4.2",
"source-map": "0.7.3",
"@babel/core": "7.22.1",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.1",
"@rollup/plugin-node-resolve": "15.1.0",
"@rollup/plugin-sucrase": "5.0.1",
"@sucrase/jest-plugin": "3.0.0",
"@types/babel__core": "7.20.1",
"@types/babel__traverse": "7.20.0",
"@types/jest": "29.5.2",
"@types/node": "20.2.5",
"eslint": "7.32.0",
"eslint-plugin-caleb": "11.0.0",
"jest": "29.5.0",
"prettier": "2.8.8",
"rollup": "3.23.0",
"rollup-plugin-dts": "5.3.0",
"source-map": "0.7.4",
"typescript": "5.1.3"
},
"prettier": {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/exports/handleAssignmentExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const handleAssignmentExpression = (
right.isBooleanLiteral() &&
t.isIdentifier(left.node.object, { name: 'exports' }) &&
t.isIdentifier(left.node.property, { name: '__esModule' }) &&
right.node.value === true
right.node.value
)
return path.remove()

Expand Down
1 change: 1 addition & 0 deletions src/exports/writeExports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const writeExports = (
])

const programBody = programPath.get('body')
// eslint-disable-next-line caleb/@typescript-eslint/no-unnecessary-condition
if (!programBody[0]) return // program is empty, we don't need to do anything
let newDeclarationPath: NodePath<t.Statement>
if (directAssignmentsToExportObject.length === 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/handlePotentialObjectDefineProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const isObjectDefinePropertyExport = (
t.isIdentifier(prop.key) &&
prop.key.name === 'value' &&
t.isBooleanLiteral(prop.value) &&
prop.value.value === true
prop.value.value
)
)
return false
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@ export const isValidIdentiferName = (name: string) => {
}

export const toString = (input: NodePath | t.Node) => {
const node = (input as NodePath).node || input
const node = 'node' in input ? input.node : input
return generate(node).code
}
7 changes: 2 additions & 5 deletions src/imports/handlePotentialLazyImportFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ export const handlePotentialLazyImportFunction = (

if (statements.length !== 3) return

const [
importStatement,
funcReplacementStatement,
returnStatement,
] = statements
const [importStatement, funcReplacementStatement, returnStatement] =
statements

if (
!importStatement.isVariableDeclaration() ||
Expand Down
2 changes: 2 additions & 0 deletions tests/esModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Object.defineProperty(exports, '__esModule', {
to

```js

```

# Removes direct esModule export (generated by Babel with loose: true)
Expand All @@ -20,4 +21,5 @@ exports.__esModule = true
to

```js

```

0 comments on commit 8865b9c

Please sign in to comment.