Skip to content

Commit

Permalink
Rename build folders for consistency with other packages
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Oct 29, 2024
1 parent 647b037 commit 2ac5530
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.DS_Store
node_modules
lib
es
types
coverage
examples
.vscode
.scannerwork
/node_modules
/cjs
/esm
/types
/coverage
/examples
/.vscode
/.scannerwork
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2.0.0 (September XX, 2024)
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.

1.14.1 (October 15, 2024)
- Bugfixing - Fixed error in `splitReducer` when handling actions with a `null` payload, preventing crashes caused by accessing undefined payload properties (Related to https://github.com/splitio/redux-client/issues/121).

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
"name": "@splitsoftware/splitio-redux",
"version": "1.14.1",
"description": "A library to easily use Split JS SDK with Redux and React Redux",
"main": "lib/index.js",
"module": "es/index.js",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "types/index.d.ts",
"files": [
"README.md",
"CONTRIBUTORS-GUIDE.md",
"LICENSE",
"CHANGES.txt",
"src",
"lib",
"es",
"cjs",
"esm",
"types"
],
"scripts": {
"build": "rimraf lib/* es/* types/* && tsc && tsc -m commonjs --outDir lib -d true --declarationDir types",
"build": "rimraf cjs/* esm/* types/* && tsc && tsc -m commonjs --outDir cjs -d true --declarationDir types",
"postbuild": "./version_replace.sh",
"check": "npm run check:lint && npm run check:types",
"check:lint": "eslint 'src/**/*.ts'",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": false, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "es", /* Redirect output structure to the directory. */
"outDir": "esm", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
Expand Down
2 changes: 1 addition & 1 deletion version_replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

VERSION=$(node -e "(function () { console.log(require('./package.json').version) })()")

replace 'REDUX_SDK_VERSION_NUMBER' $VERSION ./lib/constants.js ./es/constants.js
replace 'REDUX_SDK_VERSION_NUMBER' $VERSION ./cjs/constants.js ./esm/constants.js

if [ $? -eq 0 ]
then
Expand Down

0 comments on commit 2ac5530

Please sign in to comment.