Skip to content

Commit e32766a

Browse files
committed
Convert to ESM
1 parent b16c9ee commit e32766a

13 files changed

+302
-22
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: actions/setup-python@v4
16+
- uses: actions/setup-python@v5
1717
with:
18+
python-version: '3.12'
1819
cache: 'pip'
1920
- uses: pre-commit/[email protected]
2021

@@ -23,7 +24,7 @@ jobs:
2324

2425
strategy:
2526
matrix:
26-
node-version: [18.x, 20.x]
27+
node-version: [20.x, 22.x]
2728

2829
steps:
2930
- uses: actions/checkout@v4

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*
2+
!dist/**
3+
!src/**
4+
!package*json
5+
!README*
6+
!tsconfig*
7+
tsconfig.eslint.json

__tests__/replace.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fc, { Arbitrary } from 'fast-check';
2-
import { replace } from '../src';
2+
import { replace } from '../src/index.js';
33

44
const EachSimpleType = [
55
['string', fc.string()],

__tests__/tsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Typescript config for tests
2+
{
3+
"extends": "../tsconfig.json",
4+
5+
"compilerOptions": {
6+
"types": ["jest", "node"],
7+
"composite": true,
8+
"allowJs": true,
9+
"sourceMap": true,
10+
},
11+
"exclude": [],
12+
"include": ["./**/*", "./**/*", "./*", "../src/**/*"],
13+
}

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default [
7474
project: [
7575
'./tsconfig.eslint.json',
7676
'./tsconfig.json',
77-
'./tsconfig.prod.json',
77+
'./tsconfig.node.json',
7878
],
7979
},
8080
},

package-lock.json

Lines changed: 198 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.cjs-template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"//": "See fast-check for example of exporting both CJS and ESM. https://github.com/dubzzz/fast-check/blob/main/packages/vitest/package.json",
3+
"type": "commonjs",
4+
"sideEffects": false
5+
}

0 commit comments

Comments
 (0)