Skip to content

Commit d744912

Browse files
Merge pull request #828 from splitio/rename_dist_folders
Rename distribution folders
2 parents 6325b9e + ea5e43a commit d744912

39 files changed

+124
-3268
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
],
4747
"rules": {
4848
"no-restricted-syntax": ["error", "ForOfStatement", "ForInStatement", "ArrayPattern"],
49-
"compat/compat": ["error", "defaults, ie 10, node 6"],
49+
"compat/compat": ["error", "defaults, node >=14"],
5050
"no-throw-literal": "error",
5151
"import/no-default-export": "error",
5252
"import/no-self-import": "error"

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build
5959

6060
- name: Store assets
61-
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master') }}
61+
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/refactor_type_definitions' || github.ref == 'refs/heads/master') }}
6262
uses: actions/upload-artifact@v3
6363
with:
6464
name: assets
@@ -69,7 +69,7 @@ jobs:
6969
name: Upload assets
7070
runs-on: ubuntu-20.04
7171
needs: build
72-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
72+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/refactor_type_definitions' }}
7373
strategy:
7474
matrix:
7575
environment:

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ dump.rdb
1919
/stats
2020

2121
## transpiled code
22-
/lib
23-
/es
22+
/cjs
23+
/esm
2424
/umd
2525

2626
## TS tests compilated files

CHANGES.txt

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
10.29.0 (October XX, 2024)
2-
- Added `factory.destroy()` method, which invokes the `destroy` method on all SDK clients created by the factory.
3-
- Updated @splitsoftware/splitio-commons package to version 1.18.0 that includes minor updates:
4-
- Added support for targeting rules based on large segments for browsers.
5-
- Updated some transitive dependencies for vulnerability fixes.
6-
- Bugfixing - Removed an overloaded `client` method in the `SplitIO.ISDK` interface that accepted a key and trafficType parameters. This interface corresponds to the SDK factory instance in NodeJS, which, unlike `SplitIO.IBrowserSDK` for the Browser, does not handle multiple client instances based on keys or traffic types.
1+
11.0.0 (November 1, 2024)
2+
- Added support for targeting rules based on large segments for browsers.
3+
- Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.
4+
- Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.
5+
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.
6+
- BREAKING CHANGES:
7+
- Dropped support for NodeJS v6. The SDK now requires NodeJS v14 or above.
8+
- Removed internal ponyfills for the `Map` and `Set` global objects, dropping support for IE and other outdated browsers. The SDK now requires the runtime environment to support these features natively or provide a polyfill.
9+
- Removed the deprecated `GOOGLE_ANALYTICS_TO_SPLIT` and `SPLIT_TO_GOOGLE_ANALYTICS` integrations. The `integrations` configuration option has been removed from the SDK factory configuration, along with the associated interfaces in the TypeScript definitions.
10+
- Removed the `core.trafficType` configuration option (`SplitIO.IBrowserSettings['core']['trafficType]`) and the `trafficType` parameter from the SDK `client()` method in Browser (`SplitIO.IBrowserSDK['client']`). As a result, traffic types can no longer be bound to SDK clients, and the traffic type must be provided in the `track` method.
711

812
10.28.0 (September 6, 2024)
913
- Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
@@ -514,7 +518,7 @@
514518
- Bugfixing - Return correct label when consulted Split is not found.
515519

516520
9.1.1 (May 03, 2017)
517-
- Bugfixing - Fixed invalid behaviour when using native Fetch API and comparing statusText
521+
- Bugfixing - Fixed invalid behavior when using native Fetch API and comparing statusText
518522
instead of resp.ok
519523

520524
9.1.0 (April 21, 2017)

client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"main": "../lib/factory/browser.js",
3-
"module": "../es/factory/browser.js",
2+
"main": "../cjs/factory/browser.js",
3+
"module": "../esm/factory/browser.js",
44
"types": "../types/client/index.d.ts"
55
}

karma/e2e.gaIntegration.karma.conf.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

package-lock.json

Lines changed: 20 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
{
22
"name": "@splitsoftware/splitio",
3-
"version": "10.28.1-rc.4",
3+
"version": "11.0.0-rc.5",
44
"description": "Split SDK",
55
"files": [
66
"README.md",
77
"CONTRIBUTORS-GUIDE.md",
88
"LICENSE",
99
"CHANGES.txt",
10-
"lib",
10+
"cjs",
1111
"types",
12-
"es",
12+
"esm",
1313
"src",
14-
"scripts/ga-to-split-autorequire.js",
1514
"client",
1615
"server"
1716
],
@@ -32,17 +31,14 @@
3231
"sdk",
3332
"javascript"
3433
],
35-
"main": "lib/index.js",
36-
"module": "es/index.js",
34+
"main": "cjs/index.js",
35+
"module": "esm/index.js",
3736
"types": "types",
3837
"engines": {
39-
"npm": ">=3",
40-
"node": ">=6"
38+
"node": ">=14.0.0"
4139
},
4240
"dependencies": {
43-
"@splitsoftware/splitio-commons": "1.17.1-rc.4",
44-
"@types/google.analytics": "0.0.40",
45-
"@types/ioredis": "^4.28.0",
41+
"@splitsoftware/splitio-commons": "2.0.0-rc.6",
4642
"bloom-filters": "^3.0.0",
4743
"ioredis": "^4.28.0",
4844
"js-yaml": "^3.13.1",
@@ -84,14 +80,13 @@
8480
"webpack-merge": "^5.8.0"
8581
},
8682
"scripts": {
87-
"build-esm": "rimraf es && tsc -outDir es",
88-
"postbuild-esm": "cross-env NODE_ENV=es node scripts/copy.packages.json.js && ./scripts/build_esm_replace_imports.sh",
83+
"build-esm": "rimraf esm && tsc -outDir esm",
84+
"postbuild-esm": "cross-env NODE_ENV=esm node scripts/copy.packages.json.js && ./scripts/build_esm_replace_imports.sh",
8985
"build-umd:stats": "webpack --progress --env production --json > ./stats/stat_results.json",
90-
"build-cjs": "rimraf lib && tsc -outDir lib -m CommonJS",
86+
"build-cjs": "rimraf cjs && tsc -outDir cjs -m CommonJS",
9187
"postbuild-cjs": "cross-env NODE_ENV=cjs node scripts/copy.packages.json.js && ./scripts/build_cjs_replace_imports.sh",
9288
"build-umd": "rimraf umd && webpack --config webpack.dev.js --env branch=$BUILD_BRANCH && webpack --config webpack.prod.js --env branch=$BUILD_BRANCH && ./scripts/clean_umd_build.sh",
9389
"build:npm": "npm run build-cjs && npm run build-esm",
94-
"build:ga-to-split-autorequire": "terser ./node_modules/@splitsoftware/splitio-commons/src/integrations/ga/autoRequire.js --mangle --output ./scripts/ga-to-split-autorequire.js && cp ./scripts/ga-to-split-autorequire.js umd/ga-to-split-autorequire.js",
9590
"build": "npm run build-cjs && npm run build-esm && npm run build-umd",
9691
"check": "npm run check:lint && npm run check:version",
9792
"check:lint": "eslint src",
@@ -104,7 +99,6 @@
10499
"test-browser-e2e-destroy": "cross-env NODE_ENV=test karma start karma/e2e.destroy.karma.conf.js",
105100
"test-browser-e2e-errorCatching": "cross-env NODE_ENV=test karma start karma/e2e.errorCatching.karma.conf.js",
106101
"test-browser-e2e-push": "cross-env NODE_ENV=test karma start karma/e2e.push.karma.conf.js",
107-
"test-browser-e2e-gaIntegration": "cross-env NODE_ENV=test karma start karma/e2e.gaIntegration.karma.conf.js",
108102
"test-node": "npm run test-node-unit && npm run test-node-e2e",
109103
"test-node-unit": "cross-env NODE_ENV=test tape -r ./ts-node.register \"src/*/**/__tests__/**/!(browser).spec.js\" | tap-min",
110104
"test-node-e2e": "npm run test-node-e2e-online && npm run test-node-e2e-offline && npm run test-node-e2e-destroy && npm run test-node-e2e-errorCatching && npm run test-node-e2e-push && npm run test-node-e2e-redis",
@@ -114,9 +108,7 @@
114108
"test-node-e2e-errorCatching": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/errorCatching/node.spec.js | tap-min",
115109
"test-node-e2e-push": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/push/node.spec.js | tap-min",
116110
"test-node-e2e-redis": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/consumer/node_redis.spec.js | tap-min",
117-
"pretest-ts-decls": "npm run build-esm && npm run build-cjs && npm link",
118-
"test-ts-decls": "./scripts/ts-tests.sh",
119-
"posttest-ts-decls": "npm rm --location=global @splitsoftware/splitio && npm install",
111+
"test-ts-decls": "tsc --build ts-tests",
120112
"test": "npm run test-node && npm run test-browser",
121113
"all": "npm run check && npm run build && npm run test-ts-decls && npm run test",
122114
"publish:rc": "npm run check && npm run build && npm publish --tag canary",

scripts/build_cjs_replace_imports.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
# replace splitio-commons imports to use ES modules
4-
replace '@splitsoftware/splitio-commons/src' '@splitsoftware/splitio-commons/cjs' ./lib -r
3+
# replace splitio-commons imports to use CommonJS
4+
replace '@splitsoftware/splitio-commons/src' '@splitsoftware/splitio-commons/cjs' ./cjs -r
55

66
if [ $? -eq 0 ]
77
then

scripts/build_esm_replace_imports.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
# replace splitio-commons imports to use ES modules
4-
replace '@splitsoftware/splitio-commons/src' '@splitsoftware/splitio-commons/esm' ./es -r
3+
# replace splitio-commons imports to use EcmaScript Modules
4+
replace '@splitsoftware/splitio-commons/src' '@splitsoftware/splitio-commons/esm' ./esm -r
55

66
if [ $? -eq 0 ]
77
then

0 commit comments

Comments
 (0)