Skip to content

Commit e6f9a9b

Browse files
authored
Updated versions of murmurhash and uuid and dropped support for old node versions and browsers (optimizely#762)
## Summary - Updated `murmurhash` dependency to version `2.0.1`. - Updated `uuid` dependency to version `8.3.2`. - Dropped support of Node JS versions `11` and earlier. - Dropped support for the following browser versions. - All versions of Microsoft Internet Explorer. - Chrome versions earlier than `102.0`. - Microsoft Edge versions earlier than `84.0`. - Firefox versions earlier than `91.0`. - Opera versions earlier than `76.0`. - Safari versions earlier than `13.0`. ## Test Plan All existing tests pass.
1 parent b2aaa74 commit e6f9a9b

File tree

7 files changed

+132
-14509
lines changed

7 files changed

+132
-14509
lines changed

.github/workflows/javascript.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
npm run lint
2828
2929
integration_tests:
30-
uses: optimizely/javascript-sdk/.github/workflows/integration_test.yml@uzair/test-with-fsc
30+
uses: optimizely/javascript-sdk/.github/workflows/integration_test.yml@master
3131
secrets:
3232
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
3333
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
3434

3535
fullstack_production_suite:
36-
uses: optimizely/javascript-sdk/.github/workflows/integration_test.yml@uzair/test-with-fsc
36+
uses: optimizely/javascript-sdk/.github/workflows/integration_test.yml@master
3737
with:
3838
FULLSTACK_TEST_REPO: ProdTesting
3939
secrets:
@@ -53,7 +53,7 @@ jobs:
5353
- name: Set up Node
5454
uses: actions/setup-node@v3
5555
with:
56-
node-version: 8
56+
node-version: 12
5757
cache: 'npm'
5858
cache-dependency-path: packages/optimizely-sdk/package-lock.json
5959
- name: Cross-browser and umd unit tests
@@ -66,7 +66,7 @@ jobs:
6666
runs-on: ubuntu-latest
6767
strategy:
6868
matrix:
69-
node: [ '8', '9', '10', '12', '14' ]
69+
node: [ '12', '14', '16', '18' ]
7070
steps:
7171
- uses: actions/checkout@v3
7272
- name: Set up Node ${{ matrix.node }}

packages/optimizely-sdk/CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Changed
11+
- Updated `murmurhash` dependency to version `2.0.1`.
12+
- Updated `uuid` dependency to version `8.3.2`.
13+
- Dropped support for the following browser versions.
14+
- All versions of Microsof Internet Explorer.
15+
- Chrome versions earlier than `102.0`.
16+
- Microsoft Edge versions earlier than `84.0`.
17+
- Firefox versions earlier than `91.0`.
18+
- Opera versions earlier than `76.0`.
19+
- Safari versions earlier than `13.0`.
1120

1221
## [4.9.2] - June 27, 2022
1322

packages/optimizely-sdk/karma.base.conf.js

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2020 Optimizely
2+
* Copyright 2018, 2020, 2022 Optimizely
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,52 +54,50 @@ module.exports = {
5454
customLaunchers: {
5555
bs_chrome_mac: {
5656
base: 'BrowserStack',
57-
browser: 'chrome',
58-
browser_version: '21.0',
5957
os: 'OS X',
60-
os_version: 'Mountain Lion',
58+
os_version: 'Mojave',
59+
browserName: 'Chrome',
60+
browser_version: '102.0',
61+
browser: 'Chrome',
6162
},
6263
bs_edge: {
6364
base: 'BrowserStack',
6465
os: 'Windows',
6566
os_version: '10',
66-
browser: 'edge',
67-
device: null,
68-
browser_version: '15.0',
69-
},
70-
bs_firefox_mac: {
71-
base: 'BrowserStack',
72-
browser: 'firefox',
73-
browser_version: '21.0',
74-
os: 'OS X',
75-
os_version: 'Mountain Lion',
67+
browserName: 'Edge',
68+
browser_version: '84.0',
69+
browser: 'Edge',
7670
},
77-
bs_ie: {
71+
bs_firefox: {
7872
base: 'BrowserStack',
7973
os: 'Windows',
80-
os_version: '7',
81-
browser: 'ie',
82-
device: null,
83-
browser_version: '10.0',
74+
browser: 'Firefox',
75+
os_version: '10',
76+
browserName: 'Firefox',
77+
browser_version: '91.0',
8478
},
79+
8580
bs_opera_mac: {
8681
base: 'BrowserStack',
87-
browser: 'opera',
88-
browser_version: '37',
82+
browser: 'Opera',
83+
os_version: 'Mojave',
84+
browserName: 'Opera',
85+
browser: 'Opera',
86+
browser_version: '76.0',
8987
os: 'OS X',
90-
os_version: 'Mountain Lion',
9188
},
9289
bs_safari: {
9390
base: 'BrowserStack',
9491
os: 'OS X',
95-
os_version: 'Mountain Lion',
96-
browser: 'safari',
92+
os_version: 'Catalina',
93+
browserName: 'Safari',
94+
browser_version: '13.0',
95+
browser: 'Safari',
9796
device: null,
98-
browser_version: '6.2',
9997
},
10098
},
10199

102-
browsers: ['bs_chrome_mac', 'bs_edge', 'bs_firefox_mac', 'bs_ie', 'bs_opera_mac', 'bs_safari'],
100+
browsers: ['bs_chrome_mac', 'bs_edge', 'bs_firefox', 'bs_opera_mac', 'bs_safari'],
103101

104102
// frameworks to use
105103
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter

packages/optimizely-sdk/lib/core/bucketer/index.tests.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ describe('lib/core/bucketer', function () {
352352
expect(bucketer._generateBucketValue(bucketingKey4)).to.equal(5439);
353353
});
354354

355-
it('should return an error if it cannot generate the hash value', function () {
356-
assert.throws(function () {
355+
it('should return an error if it cannot generate the hash value', function() {
356+
const response = assert.throws(function() {
357357
bucketer._generateBucketValue(null);
358-
}, sprintf(ERROR_MESSAGES.INVALID_BUCKETING_ID, 'BUCKETER', null, "Cannot read property 'length' of null"));
358+
} );
359+
expect([
360+
sprintf(ERROR_MESSAGES.INVALID_BUCKETING_ID, 'BUCKETER', null, "Cannot read property 'length' of null"), // node v14
361+
sprintf(ERROR_MESSAGES.INVALID_BUCKETING_ID, 'BUCKETER', null, "Cannot read properties of null (reading \'length\')") // node v16
362+
]).contain(response.message);
359363
});
360364
});
361365

packages/optimizely-sdk/lib/utils/fns/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
import v4 from 'uuid';
16+
import { v4 } from 'uuid';
1717

1818
const MAX_SAFE_INTEGER_LIMIT = Math.pow(2, 53);
1919

0 commit comments

Comments
 (0)