Skip to content

Commit 0addd64

Browse files
authored
Merge pull request #438 from contentful/refactor/modern-esm-support
BREAKING CHANGE: Discontinued the browser-specific build variant
2 parents fbc7975 + 330e79d commit 0addd64

38 files changed

+4980
-11876
lines changed

.babelrc

-4
This file was deleted.

.circleci/config.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ jobs:
1111
steps:
1212
- checkout
1313
- node/install-packages
14-
- run: npm run build
15-
- run: npm run tsc
1614
- run: npm run lint
15+
- run: npm run build
1716
- run: npm run prettier:check
1817
- run: npm run test:cover
1918
release:

.eslintignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
dist
2-
coverage
3-
test/.eslintrc.js
2+
coverage

.eslintrc.js .eslintrc.cjs

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
module.exports = {
2+
parser: '@typescript-eslint/parser',
23
overrides: [
34
{
4-
files: '**/*.js',
5-
parser: 'babel-eslint',
6-
extends: ['standard', 'prettier'],
7-
plugins: ['standard', 'promise'],
8-
},
9-
{
10-
files: '**/*.ts',
5+
files: 'src/**/*.ts',
6+
parser: '@typescript-eslint/parser',
7+
plugins: ['@typescript-eslint'],
118
extends: [
129
'eslint:recommended',
1310
'plugin:@typescript-eslint/eslint-recommended',
1411
'plugin:@typescript-eslint/recommended',
1512
'prettier',
1613
],
17-
plugins: ['promise'],
14+
rules: {
15+
'@typescript-eslint/no-explicit-any': 1,
16+
},
1817
},
1918
],
20-
}
19+
}

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run lint

.husky/pre-push

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm run prettier:check
2+
npm run test

.prettierrc

-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"tabWidth": 2,
44
"useTabs": false,
55
"singleQuote": true,
6-
"jsxBracketSameLine": true,
76
"semi": false
87
}

README.md

+4-23
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ This package contains some core modules and utilities used by both the [contentf
2525

2626
## Support
2727

28-
We support LTS versions of Node.js and all current browsers in their last 3 versions including IE 11.
28+
This repository is compatible with Node.js version 18 and later. It exclusively provides an ECMAScript Module (ESM) variant, utilizing the `"type": "module"` declaration in `package.json`. Users are responsible for addressing any compatibility issues between ESM and CommonJS (CJS).
2929

30-
### ES2015 modules version
30+
## Types
3131

32-
For bundlers like webpack2 and rollup we support the `module` &
33-
`jsnext:main` entry in the package.json
32+
TypeScript definitions for this repository are available through the `"types"` property in `package.json`.
3433

3534
## Development
3635

@@ -52,22 +51,4 @@ Run unit tests including coverage report:
5251

5352
```
5453
npm run test:cover
55-
```
56-
57-
Run unit tests with coverage report and display the result in your browser:
58-
59-
```
60-
npm run browser-coverage
61-
```
62-
63-
Emulate a CI test run:
64-
65-
```
66-
npm run test:ci-emulate
67-
```
68-
69-
Enable debug mode for tests:
70-
71-
```
72-
npm run test:debug
73-
```
54+
```

jest.config.js

-8
This file was deleted.

jest.setup.js

-2
This file was deleted.

0 commit comments

Comments
 (0)