Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #19 from erykpiast/feature/es6
Browse files Browse the repository at this point in the history
Support for ES6 modules
  • Loading branch information
rhysforyou authored Jan 29, 2020
2 parents 3093e55 + 77e3400 commit 6e6ec82
Show file tree
Hide file tree
Showing 11 changed files with 6,970 additions and 22 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Features

* **build:** add standard-version release system ([ff38b57](https://github.com/rpowelll/bs-enzyme/commit/ff38b57))
* **build:** change build target to ES6 modules ([96384c6](https://github.com/rpowelll/bs-enzyme/commit/96384c6))
* **build:** compile Reason automatically before running tests ([68513ef](https://github.com/rpowelll/bs-enzyme/commit/68513ef))
* **deps:** add package lock file ([14841ff](https://github.com/rpowelll/bs-enzyme/commit/14841ff))
* **deps:** use exact versions of dependencies ([2fc885f](https://github.com/rpowelll/bs-enzyme/commit/2fc885f))

### BREAKING CHANGES

* **build:** As output JavaScript has ES6 module format now, supporting ES5 targets requires additional transpilation.

## [0.6.1][0.6.1] 2019-02-01

### [Fixed]
Expand Down
4 changes: 4 additions & 0 deletions bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"bs-dependencies": ["reason-react"],
"bs-dev-dependencies": ["@glennsl/bs-jest"],
"bsc-flags": ["-bs-super-errors"],
"package-specs": [{
"module": "es6",
"in-source": true
}],
"sources": [
{
"dir": "src"
Expand Down
10 changes: 10 additions & 0 deletions jest-transform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = require('babel-jest').createTransformer({
presets: [
['@babel/preset-env', {
modules: 'cjs',
targets: {
node: 11,
}
}]
],
});
14 changes: 14 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
testMatch: [
"**/src/**/*_test.js"
],
moduleFileExtensions: ['js'],
transform: {
'^.+\\.js$': './jest-transform.js',
},
transformIgnorePatterns: [
// transform ES6 modules generated by BuckleScript
// https://regexr.com/46984
'/node_modules/(?!(@.*/)?(bs-.*|reason-.*)/).+\\.js$',
],
};
Loading

0 comments on commit 6e6ec82

Please sign in to comment.