Skip to content

Commit

Permalink
Merge pull request #438 from contentful/refactor/modern-esm-support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Discontinued the browser-specific build variant
  • Loading branch information
mgoudy91 authored Sep 25, 2024
2 parents fbc7975 + 330e79d commit 0addd64
Show file tree
Hide file tree
Showing 38 changed files with 4,980 additions and 11,876 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ jobs:
steps:
- checkout
- node/install-packages
- run: npm run build
- run: npm run tsc
- run: npm run lint
- run: npm run build
- run: npm run prettier:check
- run: npm run test:cover
release:
Expand Down
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist
coverage
test/.eslintrc.js
coverage
17 changes: 8 additions & 9 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
module.exports = {
parser: '@typescript-eslint/parser',
overrides: [
{
files: '**/*.js',
parser: 'babel-eslint',
extends: ['standard', 'prettier'],
plugins: ['standard', 'promise'],
},
{
files: '**/*.ts',
files: 'src/**/*.ts',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
plugins: ['promise'],
rules: {
'@typescript-eslint/no-explicit-any': 1,
},
},
],
}
}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
2 changes: 2 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run prettier:check
npm run test
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxBracketSameLine": true,
"semi": false
}
27 changes: 4 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ This package contains some core modules and utilities used by both the [contentf

## Support

We support LTS versions of Node.js and all current browsers in their last 3 versions including IE 11.
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).

### ES2015 modules version
## Types

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

## Development

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

```
npm run test:cover
```

Run unit tests with coverage report and display the result in your browser:

```
npm run browser-coverage
```

Emulate a CI test run:

```
npm run test:ci-emulate
```

Enable debug mode for tests:

```
npm run test:debug
```
```
8 changes: 0 additions & 8 deletions jest.config.js

This file was deleted.

2 changes: 0 additions & 2 deletions jest.setup.js

This file was deleted.

Loading

0 comments on commit 0addd64

Please sign in to comment.