Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modern esm support #438

Merged
merged 39 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3f820e9
refactor: moden and dual cjs/esm support
axe312ger Feb 19, 2024
ed8ebee
refactor: fix file endings to ensude node accepts the syntax format
axe312ger Feb 19, 2024
426859a
build: make jest, eslint, typescript and babel work together - plus c…
axe312ger Feb 22, 2024
4385aa6
build: remove extra tsc step
axe312ger Feb 22, 2024
dee3a0c
build: update package-lock.json
axe312ger Feb 22, 2024
02b3d8a
fix: switch to assert syntax which is supported by node v18
axe312ger Feb 22, 2024
63672e1
refactor: turn into ESM only module without bundles and replace Jest …
axe312ger Mar 20, 2024
9855e5a
build: update several dependencies
axe312ger Mar 20, 2024
82f8e2a
build: update husky and other build related dependencies to latest ve…
axe312ger Mar 20, 2024
e31eb53
style: further clean up
axe312ger Mar 20, 2024
3952029
style: ensure we use .js file extension
axe312ger Mar 20, 2024
665e5d9
refactor: clean up husky usage
axe312ger Mar 20, 2024
458fe5d
chore: fix husky and vitest imports
axe312ger Mar 20, 2024
615d13e
refactor: replace lodash dependency mix with lodash-es
axe312ger Mar 20, 2024
b01a189
refactor: replace lodash-es with regular lodash
axe312ger Mar 20, 2024
739e62a
fix: adjust lodash usage to allow better tree shaking
axe312ger Mar 25, 2024
5cc291a
refactor: use process package to ensure bundles can replace it proper…
axe312ger May 28, 2024
c86e215
build: minor and patch updates
axe312ger May 28, 2024
09c26fa
build: v9.0.0-alpha.2
axe312ger May 28, 2024
067a932
style: apply prettier
axe312ger May 28, 2024
2045188
Merge branch 'master' into refactor/modern-esm-support
axe312ger Jun 19, 2024
8048ba7
build: remove traces from local verdaccio testing
axe312ger Jun 19, 2024
6d60fe5
build: add linux gnu dependency as optional for rollup on circleci
axe312ger Jun 19, 2024
ffca932
Merge branch 'master' into refactor/modern-esm-support
axe312ger Jun 26, 2024
0481e83
build: update eslint plugins to support typescript v5.5
axe312ger Jun 26, 2024
c757c31
build: apply npm dedupe
axe312ger Jun 26, 2024
3ece6c1
fix: prerelease
mgoudy91 Jul 1, 2024
b182330
fix: force release
mgoudy91 Jul 1, 2024
9cb6ae8
Merge pull request #475 from contentful/trigger-release
mgoudy91 Jul 1, 2024
94bcde7
fix: force release
mgoudy91 Jul 1, 2024
39592a8
Merge pull request #476 from contentful/trigger-release
mgoudy91 Jul 1, 2024
9dade6d
fix: branch name
mgoudy91 Jul 1, 2024
d87dcde
Merge pull request #477 from contentful/trigger-release
mgoudy91 Jul 1, 2024
7c8cee2
fix: reset version number to valid semver
axe312ger Jul 13, 2024
282b490
Merge branch 'master' into refactor/modern-esm-support
axe312ger Jul 13, 2024
582b8ac
build: upgrade vitest and update other dev dependencies
axe312ger Jul 13, 2024
f3f26f5
build: update dependencies that we upgraded before
axe312ger Jul 13, 2024
afbfd50
build: apply npm dedupe
axe312ger Jul 13, 2024
330e79d
Merge branch 'master' into refactor/modern-esm-support
mgoudy91 Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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