Skip to content

Commit 11479cc

Browse files
Publish Next Version (#27)
1 parent 8865b9c commit 11479cc

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

.changeset/lazy-buttons-raise.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# babel-plugin-un-cjs
22

3+
## 2.6.0
4+
5+
### Minor Changes
6+
7+
- [`428d52a`](https://github.com/calebeby/babel-plugin-un-cjs/commit/428d52a249b1056177070fcffaf3dfb0a1a64833) Thanks [@calebeby](https://github.com/calebeby)! - Handle edge case: instance methods of `Function.prototype`:
8+
9+
If an imported binding _only_ is referenced using properties of `Function.prototype`, this suggests that the imported binding itself is probably a function instead of a namespace, so we create a default import instead of a namespace import.
10+
11+
```js
12+
var bind = require('function-bind')
13+
14+
bind.call(Function.call, Object.prototype.hasOwnProperty)
15+
```
16+
17+
to
18+
19+
```js
20+
import bind from 'function-bind'
21+
bind.call(Function.call, Object.prototype.hasOwnProperty)
22+
```
23+
324
## 2.5.0
425

526
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-plugin-un-cjs",
3-
"version": "2.5.0",
3+
"version": "2.6.0",
44
"repository": "calebeby/babel-plugin-un-cjs",
55
"description": "",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)