Skip to content

Commit

Permalink
Switch to ESM (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss authored Nov 30, 2023
1 parent c967052 commit 600a576
Show file tree
Hide file tree
Showing 101 changed files with 2,533 additions and 1,949 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"rules": {
"import/no-cycle": "error",
"node/no-extraneous-import": "error",
"node/file-extension-in-import": "error",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
- BREAKING CHANGE: Switch to ESM ([#338](https://github.com/cucumber/react-components/pull/338))

## [21.1.1] - 2023-07-13
### Fixed
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

## Usage

React 18 or above is required.
- This package is distributed in ES module format only.
- React 18 or above is required.

The source code for screenshots above is:

Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest/presets/default-esm',
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1', // trim .js extensions from imports which confuse jest-resolve
'.+\\.(css|scss)$': 'identity-obj-proxy', // map stylesheet imports to an empty object
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.cjs'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
isolatedModules: true
},
],
},
}

9 changes: 0 additions & 9 deletions jest.config.js

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 600a576

Please sign in to comment.