workspace-tools 0.19.4 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +54 -1
- package/CHANGELOG.md +30 -2
- package/lib/createDependencyMap.d.ts +9 -0
- package/lib/createDependencyMap.js +25 -0
- package/lib/dependencies.d.ts +7 -0
- package/lib/dependencies.js +7 -2
- package/lib/graph.d.ts +8 -6
- package/lib/graph.js +55 -21
- package/lib/paths.d.ts +0 -4
- package/lib/paths.js +1 -12
- package/lib/types/PackageGraph.d.ts +14 -0
- package/lib/types/PackageGraph.js +3 -0
- package/package.json +6 -3
- package/.github/workflows/pr.yml +0 -29
- package/.github/workflows/release.yml +0 -36
- package/.prettierrc +0 -6
- package/CODE_OF_CONDUCT.md +0 -9
- package/SECURITY.md +0 -41
- package/beachball.config.js +0 -12
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -22
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +0 -52
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1414
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/index.html +0 -42
- package/docs/interfaces/NpmLockFile.html +0 -1
- package/docs/interfaces/NpmSymlinkInfo.html +0 -1
- package/docs/interfaces/NpmWorkspacesInfo.html +0 -1
- package/docs/interfaces/PackageInfo.html +0 -1
- package/docs/interfaces/PackageInfos.html +0 -1
- package/docs/interfaces/PnpmLockFile.html +0 -1
- package/docs/modules.html +0 -70
- package/jest.config.js +0 -11
- package/lib/__tests__/dependencies.test.d.ts +0 -1
- package/lib/__tests__/dependencies.test.js +0 -141
- package/lib/__tests__/getChangedPackages.test.d.ts +0 -1
- package/lib/__tests__/getChangedPackages.test.js +0 -142
- package/lib/__tests__/getDefaultRemote.test.d.ts +0 -1
- package/lib/__tests__/getDefaultRemote.test.js +0 -26
- package/lib/__tests__/getInitDefaultBranch.test.d.ts +0 -1
- package/lib/__tests__/getInitDefaultBranch.test.js +0 -26
- package/lib/__tests__/getPackagesByFiles.test.d.ts +0 -1
- package/lib/__tests__/getPackagesByFiles.test.js +0 -54
- package/lib/__tests__/getScopedPackages.test.d.ts +0 -1
- package/lib/__tests__/getScopedPackages.test.js +0 -74
- package/lib/__tests__/getWorkspaceRoot.test.d.ts +0 -1
- package/lib/__tests__/getWorkspaceRoot.test.js +0 -40
- package/lib/__tests__/getWorkspaces.test.d.ts +0 -1
- package/lib/__tests__/getWorkspaces.test.js +0 -122
- package/lib/__tests__/lockfile.test.d.ts +0 -1
- package/lib/__tests__/lockfile.test.js +0 -42
- package/lib/__tests__/queryLockFile.test.d.ts +0 -1
- package/lib/__tests__/queryLockFile.test.js +0 -43
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,60 @@
|
|
|
2
2
|
"name": "workspace-tools",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 13 Jul 2022 20:42:04 GMT",
|
|
6
|
+
"tag": "workspace-tools_v0.22.0",
|
|
7
|
+
"version": "0.22.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "elcraig@microsoft.com",
|
|
12
|
+
"package": "workspace-tools",
|
|
13
|
+
"comment": "Update git-url-parse (includes [possible breaking changes](https://github.com/IonicaBizau/git-url-parse/releases/tag/12.0.0))",
|
|
14
|
+
"commit": "beddff28642eecabce2c64fd387bcc922ed7b941"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"patch": [
|
|
18
|
+
{
|
|
19
|
+
"author": "elcraig@microsoft.com",
|
|
20
|
+
"package": "workspace-tools",
|
|
21
|
+
"comment": "Remove unneeded files from published package",
|
|
22
|
+
"commit": "beddff28642eecabce2c64fd387bcc922ed7b941"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"date": "Fri, 01 Jul 2022 14:56:01 GMT",
|
|
29
|
+
"tag": "workspace-tools_v0.21.0",
|
|
30
|
+
"version": "0.21.0",
|
|
31
|
+
"comments": {
|
|
32
|
+
"minor": [
|
|
33
|
+
{
|
|
34
|
+
"author": "ken@gizzar.com",
|
|
35
|
+
"package": "workspace-tools",
|
|
36
|
+
"comment": "adds a package graph implementation",
|
|
37
|
+
"commit": "28ba85b087e3e3bb8715ea637563793fbb97b069"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"date": "Thu, 23 Jun 2022 20:24:15 GMT",
|
|
44
|
+
"tag": "workspace-tools_v0.20.0",
|
|
45
|
+
"version": "0.20.0",
|
|
46
|
+
"comments": {
|
|
47
|
+
"minor": [
|
|
48
|
+
{
|
|
49
|
+
"author": "elcraig@microsoft.com",
|
|
50
|
+
"package": "workspace-tools",
|
|
51
|
+
"comment": "BREAKING: Remove getChangePath because it's specific to beachball and should be defined there",
|
|
52
|
+
"commit": "bbfc44143e2f2bc0ca17bf5c351bab52fe8c9025"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"date": "Thu, 23 Jun 2022 19:53:03 GMT",
|
|
6
59
|
"tag": "workspace-tools_v0.19.4",
|
|
7
60
|
"version": "0.19.4",
|
|
8
61
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
# Change Log - workspace-tools
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 13 Jul 2022 20:42:04 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.22.0
|
|
8
|
+
|
|
9
|
+
Wed, 13 Jul 2022 20:42:04 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Update git-url-parse (includes [possible breaking changes](https://github.com/IonicaBizau/git-url-parse/releases/tag/12.0.0)) (elcraig@microsoft.com)
|
|
14
|
+
|
|
15
|
+
### Patches
|
|
16
|
+
|
|
17
|
+
- Remove unneeded files from published package (elcraig@microsoft.com)
|
|
18
|
+
|
|
19
|
+
## 0.21.0
|
|
20
|
+
|
|
21
|
+
Fri, 01 Jul 2022 14:56:01 GMT
|
|
22
|
+
|
|
23
|
+
### Minor changes
|
|
24
|
+
|
|
25
|
+
- adds a package graph implementation (ken@gizzar.com)
|
|
26
|
+
|
|
27
|
+
## 0.20.0
|
|
28
|
+
|
|
29
|
+
Thu, 23 Jun 2022 20:24:15 GMT
|
|
30
|
+
|
|
31
|
+
### Minor changes
|
|
32
|
+
|
|
33
|
+
- BREAKING: Remove getChangePath because it's specific to beachball and should be defined there (elcraig@microsoft.com)
|
|
34
|
+
|
|
7
35
|
## 0.19.4
|
|
8
36
|
|
|
9
|
-
Thu, 23 Jun 2022 19:53:
|
|
37
|
+
Thu, 23 Jun 2022 19:53:03 GMT
|
|
10
38
|
|
|
11
39
|
### Patches
|
|
12
40
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PackageInfos } from "./types/PackageInfo";
|
|
2
|
+
export interface DependencyMap {
|
|
3
|
+
dependencies: Map<string, Set<string>>;
|
|
4
|
+
dependents: Map<string, Set<string>>;
|
|
5
|
+
}
|
|
6
|
+
export declare function createDependencyMap(packages: PackageInfos): {
|
|
7
|
+
dependencies: Map<string, Set<string>>;
|
|
8
|
+
dependents: Map<string, Set<string>>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDependencyMap = void 0;
|
|
4
|
+
// @internal
|
|
5
|
+
function createDependencyMap(packages) {
|
|
6
|
+
const map = {
|
|
7
|
+
dependencies: new Map(),
|
|
8
|
+
dependents: new Map(),
|
|
9
|
+
};
|
|
10
|
+
for (const [pkg, info] of Object.entries(packages)) {
|
|
11
|
+
const deps = Object.keys(Object.assign(Object.assign({}, info.dependencies), info.devDependencies));
|
|
12
|
+
for (const dep of deps) {
|
|
13
|
+
if (!map.dependencies.has(pkg)) {
|
|
14
|
+
map.dependencies.set(pkg, new Set());
|
|
15
|
+
}
|
|
16
|
+
map.dependencies.get(pkg).add(dep);
|
|
17
|
+
if (!map.dependents.has(dep)) {
|
|
18
|
+
map.dependents.set(dep, new Set());
|
|
19
|
+
}
|
|
20
|
+
map.dependents.get(dep).add(pkg);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return map;
|
|
24
|
+
}
|
|
25
|
+
exports.createDependencyMap = createDependencyMap;
|
package/lib/dependencies.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { PackageInfo, PackageInfos } from "./types/PackageInfo";
|
|
2
2
|
export declare function getDependentMap(packages: PackageInfos): Map<string, Set<string>>;
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated Do not use
|
|
5
|
+
*
|
|
4
6
|
* for a package graph of a->b->c (where b depends on a), transitive consumers of a are b & c and their consumers (or what are the consequences of a)
|
|
5
7
|
* @param targets
|
|
6
8
|
* @param packages
|
|
@@ -8,11 +10,16 @@ export declare function getDependentMap(packages: PackageInfos): Map<string, Set
|
|
|
8
10
|
*/
|
|
9
11
|
export declare function getTransitiveConsumers(targets: string[], packages: PackageInfos, scope?: string[]): string[];
|
|
10
12
|
/**
|
|
13
|
+
* @deprecated Do not use
|
|
14
|
+
*
|
|
11
15
|
* for a package graph of a->b->c (where b depends on a), transitive providers of c are a & b and their providers (or what is needed to satisfy c)
|
|
12
16
|
* @param targets
|
|
13
17
|
* @param packages
|
|
14
18
|
*/
|
|
15
19
|
export declare function getTransitiveProviders(targets: string[], packages: PackageInfos): string[];
|
|
20
|
+
/** @deprecated Do not use */
|
|
16
21
|
export declare const getTransitiveDependencies: typeof getTransitiveProviders;
|
|
22
|
+
/** @deprecated Do not use */
|
|
17
23
|
export declare const getTransitiveDependents: typeof getTransitiveConsumers;
|
|
24
|
+
/** @deprecated Do not use */
|
|
18
25
|
export declare function getInternalDeps(info: PackageInfo, packages: PackageInfos): string[];
|
package/lib/dependencies.js
CHANGED
|
@@ -49,6 +49,8 @@ function getDependentMap(packages) {
|
|
|
49
49
|
}
|
|
50
50
|
exports.getDependentMap = getDependentMap;
|
|
51
51
|
/**
|
|
52
|
+
* @deprecated Do not use
|
|
53
|
+
*
|
|
52
54
|
* for a package graph of a->b->c (where b depends on a), transitive consumers of a are b & c and their consumers (or what are the consequences of a)
|
|
53
55
|
* @param targets
|
|
54
56
|
* @param packages
|
|
@@ -73,6 +75,8 @@ function getTransitiveConsumers(targets, packages, scope = []) {
|
|
|
73
75
|
}
|
|
74
76
|
exports.getTransitiveConsumers = getTransitiveConsumers;
|
|
75
77
|
/**
|
|
78
|
+
* @deprecated Do not use
|
|
79
|
+
*
|
|
76
80
|
* for a package graph of a->b->c (where b depends on a), transitive providers of c are a & b and their providers (or what is needed to satisfy c)
|
|
77
81
|
* @param targets
|
|
78
82
|
* @param packages
|
|
@@ -95,10 +99,11 @@ function getTransitiveProviders(targets, packages) {
|
|
|
95
99
|
return [...visited].filter((pkg) => !targets.includes(pkg));
|
|
96
100
|
}
|
|
97
101
|
exports.getTransitiveProviders = getTransitiveProviders;
|
|
98
|
-
|
|
102
|
+
/** @deprecated Do not use */
|
|
99
103
|
exports.getTransitiveDependencies = getTransitiveProviders;
|
|
100
|
-
|
|
104
|
+
/** @deprecated Do not use */
|
|
101
105
|
exports.getTransitiveDependents = getTransitiveConsumers;
|
|
106
|
+
/** @deprecated Do not use */
|
|
102
107
|
function getInternalDeps(info, packages) {
|
|
103
108
|
const deps = Object.keys(Object.assign(Object.assign({}, info.dependencies), info.devDependencies));
|
|
104
109
|
return Object.keys(packages).filter((pkg) => deps.includes(pkg));
|
package/lib/graph.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { PackageInfos } from "./types/PackageInfo";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { PackageInfos } from "./types/PackageInfo";
|
|
2
|
+
import type { PackageGraph } from "./types/PackageGraph";
|
|
3
|
+
export interface PackageGraphScope {
|
|
4
|
+
namePatterns?: string[];
|
|
5
|
+
includeDependencies?: boolean;
|
|
6
|
+
includeDependents?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function createPackageGraph(packages: PackageInfos, scope?: PackageGraphScope): PackageGraph;
|
package/lib/graph.js
CHANGED
|
@@ -1,27 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
6
|
+
exports.createPackageGraph = void 0;
|
|
7
|
+
const createDependencyMap_1 = require("./createDependencyMap");
|
|
8
|
+
const multimatch_1 = __importDefault(require("multimatch"));
|
|
9
|
+
function createPackageGraph(packages, scope = {}) {
|
|
10
|
+
const dependencyMap = (0, createDependencyMap_1.createDependencyMap)(packages);
|
|
11
|
+
const packageSet = new Set();
|
|
10
12
|
const edges = [];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const visitor = (pkg, dependencies, dependents) => {
|
|
14
|
+
packageSet.add(pkg);
|
|
15
|
+
if (scope.includeDependencies && dependencies) {
|
|
16
|
+
for (const dep of dependencies) {
|
|
17
|
+
edges.push({ name: pkg, dependency: dep });
|
|
18
|
+
packageSet.add(dep);
|
|
19
|
+
}
|
|
15
20
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
if (scope.includeDependents && dependents) {
|
|
22
|
+
for (const dep of dependents) {
|
|
23
|
+
edges.push({ name: dep, dependency: pkg });
|
|
24
|
+
packageSet.add(dep);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
visitPackageGraph(packages, dependencyMap, visitor, scope);
|
|
29
|
+
return { packages: [...packageSet], dependencies: edges };
|
|
19
30
|
}
|
|
20
|
-
exports.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
exports.createPackageGraph = createPackageGraph;
|
|
32
|
+
function visitPackageGraph(packages, dependencyMap, visitor, scope) {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
const visited = new Set();
|
|
35
|
+
const packageNames = Object.keys(packages);
|
|
36
|
+
const stack = scope && scope.namePatterns ? (0, multimatch_1.default)(packageNames, scope.namePatterns) : packageNames;
|
|
37
|
+
while (stack.length > 0) {
|
|
38
|
+
const pkg = stack.pop();
|
|
39
|
+
if (visited.has(pkg)) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const nextPkgs = [];
|
|
43
|
+
let dependencies = [];
|
|
44
|
+
let dependents = [];
|
|
45
|
+
if (scope === null || scope === void 0 ? void 0 : scope.includeDependencies) {
|
|
46
|
+
dependencies = [...(_a = dependencyMap.dependencies.get(pkg)) !== null && _a !== void 0 ? _a : []];
|
|
47
|
+
nextPkgs.push(...dependencies);
|
|
48
|
+
}
|
|
49
|
+
if (scope === null || scope === void 0 ? void 0 : scope.includeDependents) {
|
|
50
|
+
dependents = [...(_b = dependencyMap.dependents.get(pkg)) !== null && _b !== void 0 ? _b : []];
|
|
51
|
+
nextPkgs.push(...dependents);
|
|
52
|
+
}
|
|
53
|
+
visitor(pkg, dependencies, dependents);
|
|
54
|
+
visited.add(pkg);
|
|
55
|
+
if (nextPkgs.length > 0) {
|
|
56
|
+
for (const nextPkg of nextPkgs) {
|
|
57
|
+
stack.push(nextPkg);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
26
61
|
}
|
|
27
|
-
exports._resetGraphCache = _resetGraphCache;
|
package/lib/paths.d.ts
CHANGED
|
@@ -15,8 +15,4 @@ export declare function findPackageRoot(cwd: string): string | null;
|
|
|
15
15
|
* falling back to the git root if no workspace is detected.
|
|
16
16
|
*/
|
|
17
17
|
export declare function findProjectRoot(cwd: string): string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Get the folder containing beachball change files.
|
|
20
|
-
*/
|
|
21
|
-
export declare function getChangePath(cwd: string): string | null;
|
|
22
18
|
export declare function isChildOf(child: string, parent: string): boolean;
|
package/lib/paths.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isChildOf = exports.
|
|
6
|
+
exports.isChildOf = exports.findProjectRoot = exports.findPackageRoot = exports.findGitRoot = exports.searchUp = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
9
|
const getWorkspaceRoot_1 = require("./workspaces/getWorkspaceRoot");
|
|
@@ -53,17 +53,6 @@ function findProjectRoot(cwd) {
|
|
|
53
53
|
return workspaceRoot || findGitRoot(cwd);
|
|
54
54
|
}
|
|
55
55
|
exports.findProjectRoot = findProjectRoot;
|
|
56
|
-
/**
|
|
57
|
-
* Get the folder containing beachball change files.
|
|
58
|
-
*/
|
|
59
|
-
function getChangePath(cwd) {
|
|
60
|
-
const gitRoot = findGitRoot(cwd);
|
|
61
|
-
if (gitRoot) {
|
|
62
|
-
return path_1.default.join(gitRoot, "change");
|
|
63
|
-
}
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
exports.getChangePath = getChangePath;
|
|
67
56
|
function isChildOf(child, parent) {
|
|
68
57
|
const relativePath = path_1.default.relative(child, parent);
|
|
69
58
|
return /^[.\/\\]+$/.test(relativePath);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** A package graph edge that defines a single package name and one of its dependency */
|
|
2
|
+
export interface PackageDependency {
|
|
3
|
+
name: string;
|
|
4
|
+
dependency: string;
|
|
5
|
+
}
|
|
6
|
+
/** The graph is defined by as a list of package names as nodes, and a list of PackageDependency as edges*/
|
|
7
|
+
export interface PackageGraph {
|
|
8
|
+
packages: string[];
|
|
9
|
+
dependencies: PackageDependency[];
|
|
10
|
+
}
|
|
11
|
+
/** Package graph visitor is called as it visits every package in dependency order */
|
|
12
|
+
export interface PackageGraphVisitor {
|
|
13
|
+
(pkg: string, dependencies: string[], dependents: string[]): void;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workspace-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "lib/index.js",
|
|
10
10
|
"types": "lib/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"lib/!(__*)"
|
|
13
|
+
],
|
|
11
14
|
"scripts": {
|
|
12
15
|
"build": "tsc",
|
|
13
16
|
"build:docs": "typedoc src/index.ts",
|
|
@@ -21,7 +24,7 @@
|
|
|
21
24
|
"dependencies": {
|
|
22
25
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
23
26
|
"find-up": "^4.1.0",
|
|
24
|
-
"git-url-parse": "^
|
|
27
|
+
"git-url-parse": "^12.0.0",
|
|
25
28
|
"globby": "^11.0.0",
|
|
26
29
|
"jju": "^1.4.0",
|
|
27
30
|
"multimatch": "^4.0.0",
|
|
@@ -29,7 +32,6 @@
|
|
|
29
32
|
},
|
|
30
33
|
"devDependencies": {
|
|
31
34
|
"@types/git-url-parse": "^9.0.0",
|
|
32
|
-
"@types/glob": "^7.1.1",
|
|
33
35
|
"@types/jest": "^25.2.2",
|
|
34
36
|
"@types/jju": "^1.4.1",
|
|
35
37
|
"@types/multimatch": "^4.0.0",
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
"@types/yarnpkg__lockfile": "^1.1.3",
|
|
39
41
|
"beachball": "^2.17.0",
|
|
40
42
|
"jest": "^25.0.0",
|
|
43
|
+
"prettier": "^2.7.1",
|
|
41
44
|
"tmp": "^0.2.1",
|
|
42
45
|
"ts-jest": "^25.5.1",
|
|
43
46
|
"typedoc": "^0.22.15",
|
package/.github/workflows/pr.yml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
2
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
-
|
|
4
|
-
name: PR
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
pull_request:
|
|
8
|
-
branches: [master]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
strategy:
|
|
15
|
-
matrix:
|
|
16
|
-
node-version: [12.x]
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v2
|
|
20
|
-
with:
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
23
|
-
uses: actions/setup-node@v1
|
|
24
|
-
with:
|
|
25
|
-
node-version: ${{ matrix.node-version }}
|
|
26
|
-
- run: yarn
|
|
27
|
-
- run: yarn checkchange
|
|
28
|
-
- run: yarn build
|
|
29
|
-
- run: yarn test
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
2
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
-
|
|
4
|
-
name: Release
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: [master]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
strategy:
|
|
15
|
-
matrix:
|
|
16
|
-
node-version: [12.x]
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v2
|
|
20
|
-
with:
|
|
21
|
-
token: ${{ secrets.repo_pat }}
|
|
22
|
-
fetch-depth: 0
|
|
23
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
24
|
-
uses: actions/setup-node@v1
|
|
25
|
-
with:
|
|
26
|
-
node-version: ${{ matrix.node-version }}
|
|
27
|
-
- run: yarn
|
|
28
|
-
- run: yarn checkchange
|
|
29
|
-
- run: yarn build
|
|
30
|
-
- run: yarn test
|
|
31
|
-
- run: |
|
|
32
|
-
git config user.email "kchau@microsoft.com"
|
|
33
|
-
git config user.name "Ken Chau"
|
|
34
|
-
- run: yarn release -y -n $NPM_AUTHTOKEN
|
|
35
|
-
env:
|
|
36
|
-
NPM_AUTHTOKEN: ${{ secrets.npm_authtoken }}
|
package/.prettierrc
DELETED
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Microsoft Open Source Code of Conduct
|
|
2
|
-
|
|
3
|
-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
4
|
-
|
|
5
|
-
Resources:
|
|
6
|
-
|
|
7
|
-
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
|
|
8
|
-
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
|
9
|
-
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
|
package/SECURITY.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
|
|
2
|
-
|
|
3
|
-
## Security
|
|
4
|
-
|
|
5
|
-
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
|
|
6
|
-
|
|
7
|
-
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
|
|
8
|
-
|
|
9
|
-
## Reporting Security Issues
|
|
10
|
-
|
|
11
|
-
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
12
|
-
|
|
13
|
-
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
|
|
14
|
-
|
|
15
|
-
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
|
|
16
|
-
|
|
17
|
-
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
|
18
|
-
|
|
19
|
-
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
|
20
|
-
|
|
21
|
-
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
|
22
|
-
* Full paths of source file(s) related to the manifestation of the issue
|
|
23
|
-
* The location of the affected source code (tag/branch/commit or direct URL)
|
|
24
|
-
* Any special configuration required to reproduce the issue
|
|
25
|
-
* Step-by-step instructions to reproduce the issue
|
|
26
|
-
* Proof-of-concept or exploit code (if possible)
|
|
27
|
-
* Impact of the issue, including how an attacker might exploit the issue
|
|
28
|
-
|
|
29
|
-
This information will help us triage your report more quickly.
|
|
30
|
-
|
|
31
|
-
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
|
|
32
|
-
|
|
33
|
-
## Preferred Languages
|
|
34
|
-
|
|
35
|
-
We prefer all communications to be in English.
|
|
36
|
-
|
|
37
|
-
## Policy
|
|
38
|
-
|
|
39
|
-
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
|
|
40
|
-
|
|
41
|
-
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
package/beachball.config.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
scope: ["!src/__fixtures__/**/*"],
|
|
3
|
-
ignorePatterns: [
|
|
4
|
-
".github/**",
|
|
5
|
-
".prettierrc",
|
|
6
|
-
"jest.config.js",
|
|
7
|
-
"src/__fixtures__/**",
|
|
8
|
-
"src/__tests__/**",
|
|
9
|
-
// This prevents dependabot from being blocked by change file requirements for lock file-only changes
|
|
10
|
-
"yarn.lock",
|
|
11
|
-
],
|
|
12
|
-
};
|
package/docs/.nojekyll
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--light-code-background: #F5F5F5;
|
|
3
|
-
--dark-code-background: #1E1E1E;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
@media (prefers-color-scheme: light) { :root {
|
|
7
|
-
--code-background: var(--light-code-background);
|
|
8
|
-
} }
|
|
9
|
-
|
|
10
|
-
@media (prefers-color-scheme: dark) { :root {
|
|
11
|
-
--code-background: var(--dark-code-background);
|
|
12
|
-
} }
|
|
13
|
-
|
|
14
|
-
body.light {
|
|
15
|
-
--code-background: var(--light-code-background);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
body.dark {
|
|
19
|
-
--code-background: var(--dark-code-background);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
pre, code { background: var(--code-background); }
|