Skip to content

Commit

Permalink
chore(build): Bump Typescript to 3.9.2
Browse files Browse the repository at this point in the history
Generate type files for older typescript compilers

Fixed issues relating to:  microsoft/TypeScript#36696

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed May 22, 2020
1 parent 7831eb2 commit c91fe96
Show file tree
Hide file tree
Showing 44 changed files with 361 additions and 249 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
dist
lib
types
types-3.4
node_modules
build
review/api/temp
Expand Down
2 changes: 1 addition & 1 deletion examples/example-datagrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"file-loader": "^5.0.2",
"rimraf": "^2.5.2",
"style-loader": "^1.0.2",
"typescript": "~3.6.4",
"typescript": "~3.9.2",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/example-datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"file-loader": "^5.0.2",
"rimraf": "^2.5.2",
"style-loader": "^1.0.2",
"typescript": "~3.6.4",
"typescript": "~3.9.2",
"webpack": "^4.41.3"
}
}
8 changes: 4 additions & 4 deletions examples/example-datastore/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace WSAdapterMessages {
* A base message for the patch server.
*/
export
type IBaseMessage = JSONObject & {
interface IBaseMessage extends Partial<JSONObject> {
msgId: string;
msgType: (
'storeid-request' | 'storeid-reply'|
Expand All @@ -48,13 +48,13 @@ namespace WSAdapterMessages {
'history-request' | 'history-reply' |
'fetch-transaction-request' | 'fetch-transaction-reply'
);
parentId: undefined;
parentId?: string;

readonly content: ReadonlyJSONObject;
}

export
type IBaseReplyMessage = IBaseMessage & {
interface IBaseReplyMessage extends IBaseMessage {
parentId: string;
}

Expand All @@ -71,7 +71,7 @@ namespace WSAdapterMessages {
* A reply from the server containing a unique store ID.
*/
export
type IStoreIdMessageReply = IBaseReplyMessage & {
interface IStoreIdMessageReply extends IBaseReplyMessage {
msgType: 'storeid-reply';
content: {
readonly storeId: number
Expand Down
2 changes: 1 addition & 1 deletion examples/example-datastore/src/wsbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
* Abstract base for a class that sends/receives messages over websocket.
*/
export
abstract class WSConnection<T extends JSONValue, U extends JSONValue> implements IDisposable {
abstract class WSConnection<T extends Partial<JSONValue>, U extends Partial<JSONValue>> implements IDisposable {
/**
* Create a new websocket based connection.
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/example-dockpanel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"rimraf": "^2.5.2",
"source-map-loader": "0.2.4",
"style-loader": "^1.0.2",
"typescript": "~3.6.4",
"typescript": "~3.9.2",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10"
}
Expand Down
20 changes: 15 additions & 5 deletions packages/algorithm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@
"files": [
"dist/*",
"src/*",
"types/*"
"types/*",
"types-3.4/*"
],
"main": "dist/index.js",
"module": "dist/index.es6",
"unpkg": "dist/index.min.js",
"jsdelivr": "dist/index.min.js",
"types": "types/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"types-3.4/index.d.ts"
]
}
},
"scripts": {
"api": "api-extractor run --local --verbose",
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
"build": "tsc --build && rollup -c",
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
"build:test": "tsc --build tests && cd tests && webpack",
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
"docs": "typedoc --options tdoptions.json src",
Expand All @@ -45,6 +54,7 @@
"devDependencies": {
"@microsoft/api-extractor": "^7.6.0",
"@types/mocha": "^2.2.39",
"downlevel-dts": "^0.4.0",
"tslib": "1.10.0",
"chai": "^3.5.0",
"karma": "^4.4.1",
Expand All @@ -60,12 +70,12 @@
"rollup-plugin-sourcemaps": "^0.5.0",
"rollup-plugin-postcss": "^2.0.3",
"terser": "^4.6.2",
"typedoc": "~0.15.0",
"typescript": "~3.6.4",
"typedoc": "~0.17.7",
"typescript": "~3.9.2",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10"
},
"publishConfig": {
"access": "public"
}
}
}
2 changes: 1 addition & 1 deletion packages/algorithm/tdoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"excludeNotExported": true,
"mode": "file",
"target": "es5",
"module": "es5",
"module": "es6",
"lib": ["lib.es2015.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.promise.d.ts", "lib.dom.d.ts"],
"out": "../../docs/api/algorithm",
"baseUrl": ".",
Expand Down
20 changes: 15 additions & 5 deletions packages/application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@
"files": [
"dist/*",
"src/*",
"types/*"
"types/*",
"types-3.4/*"
],
"main": "dist/index.js",
"module": "dist/index.es6",
"unpkg": "dist/index.min.js",
"jsdelivr": "dist/index.min.js",
"types": "types/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"types-3.4/index.d.ts"
]
}
},
"scripts": {
"api": "api-extractor run --local --verbose",
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
"build": "tsc --build && rollup -c",
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
"build:test": "tsc --build tests && cd tests && webpack",
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
"docs": "typedoc --options tdoptions.json src",
Expand All @@ -51,6 +60,7 @@
"@microsoft/api-extractor": "^7.6.0",
"@types/chai": "^3.4.35",
"@types/mocha": "^2.2.39",
"downlevel-dts": "^0.4.0",
"tslib": "1.10.0",
"chai": "^3.5.0",
"karma": "^4.4.1",
Expand All @@ -66,12 +76,12 @@
"rollup-plugin-sourcemaps": "^0.5.0",
"rollup-plugin-postcss": "^2.0.3",
"terser": "^4.6.2",
"typedoc": "~0.15.0",
"typescript": "~3.6.4",
"typedoc": "~0.17.7",
"typescript": "~3.9.2",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10"
},
"publishConfig": {
"access": "public"
}
}
}
2 changes: 1 addition & 1 deletion packages/application/tdoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"excludeNotExported": true,
"mode": "file",
"target": "es5",
"module": "es5",
"module": "es6",
"lib": ["lib.es2015.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.promise.d.ts", "lib.dom.d.ts"],
"out": "../../docs/api/application",
"baseUrl": ".",
Expand Down
20 changes: 15 additions & 5 deletions packages/collections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@
"files": [
"dist/*",
"src/*",
"types/*"
"types/*",
"types-3.4/*"
],
"main": "dist/index.js",
"module": "dist/index.es6",
"unpkg": "dist/index.min.js",
"jsdelivr": "dist/index.min.js",
"types": "types/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"types-3.4/index.d.ts"
]
}
},
"scripts": {
"api": "api-extractor run --local --verbose",
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
"build": "tsc --build && rollup -c",
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
"build:test": "tsc --build tests && cd tests && webpack",
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
"docs": "typedoc --options tdoptions.json src",
Expand All @@ -49,6 +58,7 @@
"@microsoft/api-extractor": "^7.6.0",
"@types/chai": "^3.4.35",
"@types/mocha": "^2.2.39",
"downlevel-dts": "^0.4.0",
"tslib": "1.10.0",
"chai": "^3.5.0",
"karma": "^4.4.1",
Expand All @@ -64,12 +74,12 @@
"rollup-plugin-sourcemaps": "^0.5.0",
"rollup-plugin-postcss": "^2.0.3",
"terser": "^4.6.2",
"typedoc": "~0.15.0",
"typescript": "~3.6.4",
"typedoc": "~0.17.7",
"typescript": "~3.9.2",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10"
},
"publishConfig": {
"access": "public"
}
}
}
2 changes: 1 addition & 1 deletion packages/collections/tdoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"excludeNotExported": true,
"mode": "file",
"target": "es5",
"module": "es5",
"module": "es6",
"out": "../../docs/api/collections",
"baseUrl": ".",
"paths": {
Expand Down
20 changes: 15 additions & 5 deletions packages/commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@
"files": [
"dist/*",
"src/*",
"types/*"
"types/*",
"types-3.4/*"
],
"main": "dist/index.js",
"module": "dist/index.es6",
"unpkg": "dist/index.min.js",
"jsdelivr": "dist/index.min.js",
"types": "types/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"types-3.4/index.d.ts"
]
}
},
"scripts": {
"api": "api-extractor run --local --verbose",
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
"build": "tsc --build && rollup -c",
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
"build:test": "tsc --build tests && cd tests && webpack",
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
"docs": "typedoc --options tdoptions.json src",
Expand Down Expand Up @@ -62,6 +71,7 @@
"@microsoft/api-extractor": "^7.6.0",
"@types/chai": "^3.4.35",
"@types/mocha": "^2.2.39",
"downlevel-dts": "^0.4.0",
"tslib": "1.10.0",
"chai": "^3.5.0",
"es6-promise": "^4.0.5",
Expand All @@ -79,12 +89,12 @@
"rollup-plugin-postcss": "^2.0.3",
"terser": "^4.6.2",
"simulate-event": "^1.4.0",
"typedoc": "~0.15.0",
"typescript": "~3.6.4",
"typedoc": "~0.17.7",
"typescript": "~3.9.2",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10"
},
"publishConfig": {
"access": "public"
}
}
}
2 changes: 1 addition & 1 deletion packages/commands/tdoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"excludeNotExported": true,
"mode": "file",
"target": "es5",
"module": "es5",
"module": "es6",
"lib": ["lib.es2015.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.promise.d.ts", "lib.dom.d.ts"],
"out": "../../docs/api/commands",
"baseUrl": ".",
Expand Down
20 changes: 15 additions & 5 deletions packages/coreutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@
"files": [
"dist/*",
"src/*",
"types/*"
"types/*",
"types-3.4/*"
],
"main": "dist/index.js",
"module": "dist/index.es6",
"unpkg": "dist/index.min.js",
"jsdelivr": "dist/index.min.js",
"types": "types/index.d.ts",
"typesVersions": {
"<3.8": {
"*": [
"types-3.4/index.d.ts"
]
}
},
"scripts": {
"api": "api-extractor run --local --verbose",
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
"build": "tsc --build && rollup -c",
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
"build:test": "tsc --build tests && cd tests && webpack",
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
"docs": "typedoc --options tdoptions.json src",
Expand All @@ -49,6 +58,7 @@
"@microsoft/api-extractor": "^7.6.0",
"@types/chai": "^3.4.35",
"@types/mocha": "^2.2.39",
"downlevel-dts": "^0.4.0",
"tslib": "1.10.0",
"chai": "^3.5.0",
"es6-promise": "^4.0.5",
Expand All @@ -65,8 +75,8 @@
"rollup-plugin-sourcemaps": "^0.5.0",
"rollup-plugin-postcss": "^2.0.3",
"terser": "^4.6.2",
"typedoc": "~0.15.0",
"typescript": "~3.6.4",
"typedoc": "~0.17.7",
"typescript": "~3.9.2",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10"
},
Expand All @@ -76,4 +86,4 @@
"browser": {
"crypto": false
}
}
}
2 changes: 1 addition & 1 deletion packages/coreutils/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type JSONValue = JSONPrimitive | JSONObject | JSONArray;
* A type definition for a JSON object.
*/
export
interface JSONObject { [key: string]: JSONValue; }
interface JSONObject { [key: string]: JSONValue | ReadonlyJSONValue; }


/**
Expand Down
Loading

0 comments on commit c91fe96

Please sign in to comment.