Skip to content

Commit

Permalink
fix: Hardcode webclient version (#381)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
limhjgrace committed Mar 7, 2023
1 parent 7877e86 commit bc1c15f
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 45 deletions.
4 changes: 0 additions & 4 deletions .github/scripts/update-version.sh

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/cd.yaml
Expand Up @@ -39,12 +39,6 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Update Version
id: update-version
run: |
chmod u+x .github/scripts/update-version.sh
.github/scripts/update-version.sh
- name: Build Release
run: |
npm ci
Expand Down
7 changes: 1 addition & 6 deletions .testcaferc.json
Expand Up @@ -9,10 +9,5 @@
{
"name": "spec"
}
],
"compilerOptions": {
"typescript": {
"configPath": "./tsconfig.testcafe.json"
}
}
]
}
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -5,8 +5,8 @@
"description": "The Amazon CloudWatch RUM web client.",
"license": "Apache-2.0",
"author": "Amazon CloudWatch RUM Staff <nobody@amazon.com>",
"main": "dist/cjs/src/index.js",
"module": "dist/es/src/index.js",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"files": [
"dist/",
"CHANGELOG.md",
Expand Down
3 changes: 1 addition & 2 deletions src/event-cache/EventCache.ts
Expand Up @@ -9,8 +9,7 @@ import {
RumEvent
} from '../dispatch/dataplane';

import packageInfo from '../../version.json';
const webClientVersion = packageInfo.version;
const webClientVersion = '1.13.4';

/**
* A cache which stores events generated by telemetry plugins.
Expand Down
6 changes: 1 addition & 5 deletions src/event-cache/__tests__/EventCache.integ.test.ts
Expand Up @@ -6,11 +6,7 @@ import { DEFAULT_CONFIG, mockFetch } from '../../test-utils/test-utils';
import { SESSION_START_EVENT_TYPE } from '../../sessions/SessionManager';
import { INSTALL_MODULE } from '../../utils/constants';

jest.mock('../../../version.json', () => ({
version: '2.0.0' // WEB_CLIENT_VERSION
}));

const WEB_CLIENT_VERSION = '2.0.0';
const WEB_CLIENT_VERSION = '1.13.4';

global.fetch = mockFetch;
describe('EventCache tests', () => {
Expand Down
6 changes: 1 addition & 5 deletions src/event-cache/__tests__/EventCache.test.ts
Expand Up @@ -26,11 +26,7 @@ jest.mock('../../sessions/SessionManager', () => ({
}))
}));

jest.mock('../../../version.json', () => ({
version: '2.0.0' // WEB_CLIENT_VERSION
}));

const WEB_CLIENT_VERSION = '2.0.0';
const WEB_CLIENT_VERSION = '1.13.4';

describe('EventCache tests', () => {
beforeAll(() => {
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.json
Expand Up @@ -6,9 +6,7 @@
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"target": "es5",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true
"target": "es5"
},
"include": ["src/**/*"]
}
6 changes: 0 additions & 6 deletions tsconfig.testcafe.json

This file was deleted.

4 changes: 1 addition & 3 deletions tsconfig.unit.json
Expand Up @@ -8,9 +8,7 @@
"noEmit": true,
"strict": false,
"target": "es2018",
"types": ["node", "jest", "@testing-library/jest-dom"],
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true
"types": ["node", "jest", "@testing-library/jest-dom"]
},
"include": ["types", "**/__tests__/**/*.ts", "**/__mocks__/**/*.ts"]
}
3 changes: 0 additions & 3 deletions version.json

This file was deleted.

0 comments on commit bc1c15f

Please sign in to comment.