Skip to content

Commit

Permalink
rollback esm package definition (2.12.0 -> 2.12.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Aug 24, 2024
1 parent ad2756c commit eb0808f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// https://babeljs.io/docs/options#shouldprintcomment
const shouldPrintComment = (val) => /@license|@preserve|[#@]__PURE__/.test(val);

export default {
// export default {
module.exports = {
env: {
cjs: {
presets: ["@babel/preset-env", "@babel/preset-react"],
Expand Down
32 changes: 8 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
{
"name": "react-focus-lock",
"version": "2.12.0",
"version": "2.12.1",
"description": "It is a trap! (for a focus)",
"type": "module",
"main": "./dist/cjs/index.js",
"module": "./dist/es2015/index.js",
"jsnext:main": "./dist/es2015/index.js",
"types": "./dist/cjs/index.d.ts",
"exports": {
".": {
"import": "./dist/es2015/index.js",
"require": "./dist/cjs/index.js"
},
"./sidecar": {
"import": "./dist/es2015/sidecar.js",
"require": "./dist/cjs/sidecar.js"
},
"./UI": {
"import": "./dist/es2015/UI.js",
"require": "./dist/cjs/UI.js"
}
},
"main": "dist/cjs/index.js",
"jsnext:main": "dist/es2015/index.js",
"module": "dist/es2015/index.js",
"types": "react-focus-lock.d.ts",
"sideEffects": [
"**/sidecar.js",
"**/index.js"
],
"scripts": {
"build:cjs": "NODE_ENV=cjs babel src -d dist/cjs && copyfiles -u 1 src/**/*.d.ts dist/cjs && echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json",
"build:esm": "NODE_ENV=es2015 babel src -d dist/es2015 && copyfiles -u 1 src/**/*.d.ts dist/es2015",
"build": "rm -Rf ./dist && yarn build:esm && yarn build:cjs",
"build:cjs": "NODE_ENV=cjs babel src -d dist/cjs",
"build:es5": "NODE_ENV=es2015 babel src -d dist/es2015",
"build": "rm -Rf ./dist && yarn build:es5 && yarn build:cjs",
"test": "npm run test:pick -- '_tests/**/*spec.js'",
"test:pick": "NODE_ENV=cjs mocha --require @babel/register --require global-jsdom/register --require _tests/spinup/scaffolding --exit",
"prepublish": "npm run lint:fix && npm run build && npm run changelog",
Expand Down Expand Up @@ -95,7 +80,6 @@
"chai": "^4.1.0",
"chai-enzyme": "^1.0.0-beta.0",
"conventional-changelog-cli": "^2.0.12",
"copyfiles": "^2.4.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^5.16.0",
Expand Down

0 comments on commit eb0808f

Please sign in to comment.