Skip to content

Commit 2576f91

Browse files
authored
fix: Hardcode webclient version (#381) (#384)
* fix: Hardcode webclient version * fix: Update test variable value * fix: update webclient version * fix: revert tsconfig changes related to webclient versioning feature * fix: remove version updating
1 parent 6d2dbfc commit 2576f91

File tree

11 files changed

+8
-45
lines changed

11 files changed

+8
-45
lines changed

.github/scripts/update-version.sh

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

.github/workflows/cd.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ jobs:
3939
restore-keys: |
4040
${{ runner.os }}-node-
4141
42-
- name: Update Version
43-
id: update-version
44-
run: |
45-
chmod u+x .github/scripts/update-version.sh
46-
.github/scripts/update-version.sh
47-
4842
- name: Build Release
4943
run: |
5044
npm ci

.testcaferc.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,5 @@
99
{
1010
"name": "spec"
1111
}
12-
],
13-
"compilerOptions": {
14-
"typescript": {
15-
"configPath": "./tsconfig.testcafe.json"
16-
}
17-
}
12+
]
1813
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"description": "The Amazon CloudWatch RUM web client.",
66
"license": "Apache-2.0",
77
"author": "Amazon CloudWatch RUM Staff <[email protected]>",
8-
"main": "dist/cjs/src/index.js",
9-
"module": "dist/es/src/index.js",
8+
"main": "dist/cjs/index.js",
9+
"module": "dist/es/index.js",
1010
"files": [
1111
"dist/",
1212
"CHANGELOG.md",

src/event-cache/EventCache.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import {
99
RumEvent
1010
} from '../dispatch/dataplane';
1111

12-
import packageInfo from '../../version.json';
13-
const webClientVersion = packageInfo.version;
12+
const webClientVersion = '1.13.4';
1413

1514
/**
1615
* A cache which stores events generated by telemetry plugins.

src/event-cache/__tests__/EventCache.integ.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { DEFAULT_CONFIG, mockFetch } from '../../test-utils/test-utils';
66
import { SESSION_START_EVENT_TYPE } from '../../sessions/SessionManager';
77
import { INSTALL_MODULE } from '../../utils/constants';
88

9-
jest.mock('../../../version.json', () => ({
10-
version: '2.0.0' // WEB_CLIENT_VERSION
11-
}));
12-
13-
const WEB_CLIENT_VERSION = '2.0.0';
9+
const WEB_CLIENT_VERSION = '1.13.4';
1410

1511
global.fetch = mockFetch;
1612
describe('EventCache tests', () => {

src/event-cache/__tests__/EventCache.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ jest.mock('../../sessions/SessionManager', () => ({
2626
}))
2727
}));
2828

29-
jest.mock('../../../version.json', () => ({
30-
version: '2.0.0' // WEB_CLIENT_VERSION
31-
}));
32-
33-
const WEB_CLIENT_VERSION = '2.0.0';
29+
const WEB_CLIENT_VERSION = '1.13.4';
3430

3531
describe('EventCache tests', () => {
3632
beforeAll(() => {

tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"module": "esnext",
77
"moduleResolution": "node",
88
"strict": true,
9-
"target": "es5",
10-
"resolveJsonModule": true,
11-
"allowSyntheticDefaultImports": true
9+
"target": "es5"
1210
},
1311
"include": ["src/**/*"]
1412
}

tsconfig.testcafe.json

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

tsconfig.unit.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"noEmit": true,
99
"strict": false,
1010
"target": "es2018",
11-
"types": ["node", "jest", "@testing-library/jest-dom"],
12-
"resolveJsonModule": true,
13-
"allowSyntheticDefaultImports": true
11+
"types": ["node", "jest", "@testing-library/jest-dom"]
1412
},
1513
"include": ["types", "**/__tests__/**/*.ts", "**/__mocks__/**/*.ts"]
1614
}

0 commit comments

Comments
 (0)