Skip to content

Commit 9e826cd

Browse files
committed
build!: add support for ESM and drop support for CommonJS
BREAKING CHANGE: - node < 18, and CommonJS, are no longer supported
1 parent b38214f commit 9e826cd

File tree

10 files changed

+5508
-13853
lines changed

10 files changed

+5508
-13853
lines changed

.babelrc

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

.eslintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"extends": "okonet",
33
"env": {
4-
"browser": true,
5-
"mocha": true
4+
"browser": true
65
}
76
}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
- name: Setup Node.js
2828
uses: actions/setup-node@v4
2929
with:
30-
node-version: 14
30+
node-version: 22
3131

3232
- name: Install dependencies
3333
run: npm ci
3434

3535
- name: Release
36-
run: npx semantic-release@v19.0.5
36+
run: npx -y semantic-release@^24.1.2
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3939
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: [10, 12, 14]
17+
node-version: [20, 22]
1818

1919
steps:
2020
- name: Checkout repository
@@ -29,7 +29,7 @@ jobs:
2929
run: npm ci
3030

3131
- name: Run tests
32-
run: npm run test:cov
32+
run: npm test
3333

3434
- name: Collect coverage
3535
uses: coverallsapp/github-action@v2

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ lib-cov
1212

1313
# Coverage directory used by tools like istanbul
1414
coverage
15-
.nyc_output
15+
lcov.info
1616

1717
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
1818
.grunt
@@ -31,7 +31,6 @@ node_modules
3131
.idea
3232

3333
# Build files
34-
dist
3534
Changelog.md
3635

3736
# NPM files

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npm install --save attr-accept
1313

1414
## Usage
1515
```javascript
16-
var accept = require('attr-accept');
16+
import accept from 'attr-accept';
1717
accept({
1818
name: 'my file.png',
1919
type: 'image/png'
@@ -46,3 +46,5 @@ accept({
4646
## Contributing
4747

4848
Checkout the organization [CONTRIBUTING.md](https://github.com/react-dropzone/.github/blob/main/CONTRIBUTING.md).
49+
50+
**NOTE** The minimum required Node version for development is v20.

0 commit comments

Comments
 (0)