Skip to content

Commit

Permalink
chore: add comments to the versions.json
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Jul 20, 2021
1 parent 0c6c92c commit a9e59ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"jasmine-core": "^3.5.0",
"jest": "^26.1.0",
"jmespath": "^0.15.0",
"json5": "^2.2.0",
"karma": "^5.1.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
Expand Down
5 changes: 3 additions & 2 deletions tests/versions/tslib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/
import { execSync } from "child_process";
import { readFileSync } from "fs";

import * as expectedVersions from "./versions.json";
import JSON from "json5";
import { join } from "path";

type PackageInfo = {
name: string;
Expand All @@ -14,6 +14,7 @@ type PackageInfo = {
};

console.log("Validating the tslib and tsc version is consistent within workspace.");
const expectedVersions: { [name: string]: string } = JSON.parse(readFileSync(join(__dirname, "versions.json"), "utf8"));
const packagesInfo: PackageInfo[] = JSON.parse(execSync("./node_modules/.bin/lerna list -l --json").toString());
for (const { name, location } of packagesInfo) {
const manifest = readFileSync(`${location}/package.json`, "utf8");
Expand Down
1 change: 1 addition & 0 deletions tests/versions/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
// You need to make sure "tslib" version is compatible with typescript version.
"tslib": "^2.3.0",
"typescript": "~4.3.2"
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7205,7 +7205,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=

[email protected], json5@^2.1.2:
[email protected], json5@^2.1.2, json5@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
Expand Down

0 comments on commit a9e59ee

Please sign in to comment.