Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Lock in TypeScript to 3.7.5 #2848

Merged
merged 3 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"build": "lerna run --stream --concurrency 1 --sort build",
"build": "node ./scripts/verify-packages-versions.js && lerna run --stream --concurrency 1 --sort build",
"build:es5": "lerna run --stream --concurrency 1 --sort build:es5",
"build:esm": "lerna run --stream --concurrency 1 --sort build:esm",
"build:watch": "lerna run build:watch --stream --no-sort --concurrency 9999",
Expand Down Expand Up @@ -61,7 +61,7 @@
"size-limit": "^4.5.5",
"ts-jest": "^24.0.2",
"typedoc": "^0.18.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"resolutions": {
"**/agent-base": "5"
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"npm-run-all": "^4.1.2",
"prettier": "1.17.0",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/apm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-typescript2": "^0.21.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm build:bundle",
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-typescript2": "^0.21.0",
"sinon": "^7.3.2",
"typescript": "3.9.7",
"typescript": "3.7.5",
"webpack": "^4.30.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let transport: Transports.BaseTransport;

describe('FetchTransport', () => {
beforeEach(() => {
fetch = stub(window, 'fetch');
fetch = (stub(window, 'fetch') as unknown) as SinonStub;
transport = new Transports.FetchTransport({ dsn: testDsn });
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"npm-run-all": "^4.1.2",
"prettier": "1.17.0",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"engines": {
"node": "10.* || >= 12"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"devDependencies": {
"eslint": "7.6.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"link:yarn": "yarn link",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"mocha": "^6.2.0",
"prettier": "1.17.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"link:yarn": "yarn link",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"prettier": "1.17.0",
"react": "^16.13.1",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"npm-run-all": "^4.1.2",
"prettier": "1.17.0",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-typescript2": "^0.21.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm build:bundle",
Expand Down
2 changes: 1 addition & 1 deletion packages/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"npm-run-all": "^4.1.2",
"prettier": "1.17.0",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"npm-run-all": "^4.1.2",
"prettier": "1.17.0",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"react-test-renderer": "^16.13.1",
"redux": "^4.0.5",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/tracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-typescript2": "^0.21.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm build:bundle",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"eslint": "7.6.0",
"npm-run-all": "^4.1.2",
"prettier": "1.17.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"peerDependencies": {
"tslint": "5.16.0",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"link:yarn": "yarn link",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"npm-run-all": "^4.1.2",
"prettier": "1.17.0",
"rimraf": "^2.6.3",
"typescript": "3.9.7"
"typescript": "3.7.5"
},
"scripts": {
"build": "run-p build:es5 build:esm",
Expand Down
27 changes: 27 additions & 0 deletions scripts/verify-packages-versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const pkg = require('../package.json');

const TYPESCRIPT_VERSION = '3.7.5';

if (pkg.devDependencies.typescript !== TYPESCRIPT_VERSION) {
console.error(`
[INCORRECT PACKAGE VERSION]: Expected TypeScript v${TYPESCRIPT_VERSION}, got v${pkg.devDependencies.typescript}

Starting version 3.9, TypeScript emits module exports using \`Object.defineProperty\`,
with \`configurable: false\`, instead of \`exports.thing = module.thing;\` as it always used to do.
This means, that any object mutation after the initial compilation are impossible and makes
the package slightly less open for modifications, and prevent users from experimenting with it,
and from implementing some of their scenarios.

If you REALLY know what you are doing, and you REALLY want to use a different version of TypeScript,
modify \`TYPESCRIPT_VERSION\` constant at the top of this file.

change: https://github.com/getsentry/sentry-javascript/pull/2848
ref: https://github.com/getsentry/sentry-javascript/issues/2845
ref: https://twitter.com/wesleytodd/status/1297974661574262784

"Never upgrade a TypeScript version without a major package bump. Just don't." — Kamil
`);
process.exit(1);
}

process.exit(0);
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17930,10 +17930,10 @@ typescript-memoize@^1.0.0-alpha.3:
dependencies:
core-js "2.4.1"

typescript@3.9.7:
version "3.9.7"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
typescript@3.7.5:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==

ua-parser-js@^0.7.18:
version "0.7.21"
Expand Down