@skyux/packages 5.0.0-beta.110 → 5.0.0-beta.114
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.md +16 -0
- package/package.json +1 -4
- package/schematics/migrations/migration-collection.json +5 -0
- package/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.js +15 -40
- package/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.js.map +1 -1
- package/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.spec.js +43 -31
- package/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.spec.js.map +1 -1
- package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.d.ts +2 -0
- package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.js +47 -0
- package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.js.map +1 -0
- package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.spec.d.ts +1 -0
- package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.spec.js +76 -0
- package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.spec.js.map +1 -0
- package/schematics/utility/json-file.d.ts +0 -23
- package/schematics/utility/json-file.js +0 -74
- package/schematics/utility/json-file.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# 5.0.0-beta.114 (2021-09-22)
|
|
2
|
+
|
|
3
|
+
- `@skyux/progress-indicator@5.0.0-beta.3` [Release notes](https://github.com/blackbaud/skyux-progress-indicator/blob/5.0.0-beta.3/CHANGELOG.md)
|
|
4
|
+
|
|
5
|
+
# 5.0.0-beta.113 (2021-09-21)
|
|
6
|
+
|
|
7
|
+
- `@skyux/validation@5.0.0-beta.2` [Release notes](https://github.com/blackbaud/skyux-validation/blob/5.0.0-beta.2/CHANGELOG.md)
|
|
8
|
+
|
|
9
|
+
# 5.0.0-beta.112 (2021-09-21)
|
|
10
|
+
|
|
11
|
+
- `@skyux/ag-grid@5.0.0-beta.3` [Release notes](https://github.com/blackbaud/skyux-ag-grid/blob/5.0.0-beta.3/CHANGELOG.md)
|
|
12
|
+
|
|
13
|
+
# 5.0.0-beta.111 (2021-09-16)
|
|
14
|
+
|
|
15
|
+
- `@skyux/tabs@5.0.0-beta.3` [Release notes](https://github.com/blackbaud/skyux-tabs/blob/5.0.0-beta.3/CHANGELOG.md)
|
|
16
|
+
|
|
1
17
|
# 5.0.0-beta.110 (2021-09-16)
|
|
2
18
|
|
|
3
19
|
- Added the `ng update` schematic `setup-coverage-for-testing-module` to setup code coverage for library testing modules. [#7](https://github.com/blackbaud/skyux-packages/pull/7)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/packages",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.114",
|
|
4
4
|
"description": "Handles the `ng update` command for SKY UX component libraries.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run clean && tsc -p tsconfig.json",
|
|
@@ -78,9 +78,6 @@
|
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@angular-devkit/schematics": "^12.2.5"
|
|
80
80
|
},
|
|
81
|
-
"dependencies": {
|
|
82
|
-
"jsonc-parser": "^3.0.0"
|
|
83
|
-
},
|
|
84
81
|
"devDependencies": {
|
|
85
82
|
"@angular-devkit/schematics": "^12.2.5",
|
|
86
83
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
"factory": "./noop/noop.schematic",
|
|
6
6
|
"description": "Update all SKY UX component packages"
|
|
7
7
|
},
|
|
8
|
+
"update-peer-dependencies": {
|
|
9
|
+
"version": "5.0.0-beta.0",
|
|
10
|
+
"factory": "./update-peer-dependencies/update-peer-dependencies.schematic",
|
|
11
|
+
"description": "Update library peer dependencies"
|
|
12
|
+
},
|
|
8
13
|
"setup-coverage-for-testing-module": {
|
|
9
14
|
"version": "5.0.0-beta.0",
|
|
10
15
|
"factory": "./setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic",
|
|
@@ -10,58 +10,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
-
const
|
|
13
|
+
const tree_1 = require("../../utility/tree");
|
|
14
14
|
const workspace_1 = require("../../utility/workspace");
|
|
15
|
-
function
|
|
15
|
+
function updateSpecsEntryPoint(projectName) {
|
|
16
16
|
return (tree) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const tsconfigPath = `projects/${projectName}/tsconfig.spec.json`;
|
|
29
|
-
const tsConfig = new json_file_1.JsonFile(tree, tsconfigPath);
|
|
30
|
-
const files = tsConfig.get(['files']);
|
|
31
|
-
if (!files.includes('testing/src/test.ts')) {
|
|
32
|
-
files.push('testing/src/test.ts');
|
|
33
|
-
tsConfig.modify(['files'], files);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function createTestingEntryPoint(projectName) {
|
|
38
|
-
return (tree) => {
|
|
39
|
-
const filePath = `projects/${projectName}/testing/src/test.ts`;
|
|
40
|
-
if (!tree.exists(filePath)) {
|
|
41
|
-
tree.create(filePath, `const context = (require as any).context('./', true, /\.spec\.ts$/);
|
|
42
|
-
context.keys().map(context);
|
|
43
|
-
`);
|
|
17
|
+
const filePath = `projects/${projectName}/src/test.ts`;
|
|
18
|
+
let contents = tree_1.readRequiredFile(tree, filePath);
|
|
19
|
+
if (!contents.includes('const testingContext')) {
|
|
20
|
+
contents += `
|
|
21
|
+
// Find any tests included in the "testing" entry point.
|
|
22
|
+
try {
|
|
23
|
+
const testingContext = require.context('../testing/', true, /\\.spec\\.ts$/);
|
|
24
|
+
testingContext.keys().map(testingContext);
|
|
25
|
+
} catch (err) {}
|
|
26
|
+
`;
|
|
27
|
+
tree.overwrite(filePath, contents);
|
|
44
28
|
}
|
|
45
29
|
};
|
|
46
30
|
}
|
|
47
31
|
function updatePackages() {
|
|
48
32
|
return (tree) => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const {
|
|
33
|
+
const { workspace } = yield workspace_1.getWorkspace(tree);
|
|
50
34
|
const { project, projectName } = yield workspace_1.getProject(workspace, workspace.extensions.defaultProject);
|
|
51
35
|
// Only run for libraries.
|
|
52
36
|
if (project.extensions.projectType !== 'library') {
|
|
53
37
|
return;
|
|
54
38
|
}
|
|
55
|
-
|
|
56
|
-
// Only run if a testing module exists.
|
|
57
|
-
if (!hasTestingModule) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
return schematics_1.chain([
|
|
61
|
-
updateLibraryTsConfig(projectName),
|
|
62
|
-
updateSpecTsConfig(projectName),
|
|
63
|
-
createTestingEntryPoint(projectName),
|
|
64
|
-
]);
|
|
39
|
+
return schematics_1.chain([updateSpecsEntryPoint(projectName)]);
|
|
65
40
|
});
|
|
66
41
|
}
|
|
67
42
|
exports.default = updatePackages;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-coverage-for-testing-module.schematic.js","sourceRoot":"","sources":["../../../../src/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAyD;AAEzD,
|
|
1
|
+
{"version":3,"file":"setup-coverage-for-testing-module.schematic.js","sourceRoot":"","sources":["../../../../src/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAyD;AAEzD,6CAAsD;AACtD,uDAAmE;AAEnE,SAAS,qBAAqB,CAAC,WAAmB;IAChD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,QAAQ,GAAG,YAAY,WAAW,cAAc,CAAC;QACvD,IAAI,QAAQ,GAAG,uBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE;YAC9C,QAAQ,IAAI;;;;;;CAMjB,CAAC;YACI,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;SACpC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,SAAwB,cAAc;IACpC,OAAO,CAAO,IAAI,EAAE,EAAE;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,wBAAY,CAAC,IAAI,CAAC,CAAC;QAE/C,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,sBAAU,CAC/C,SAAS,EACT,SAAS,CAAC,UAAU,CAAC,cAAwB,CAC9C,CAAC;QAEF,0BAA0B;QAC1B,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE;YAChD,OAAO;SACR;QAED,OAAO,kBAAK,CAAC,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACrD,CAAC,CAAA,CAAC;AACJ,CAAC;AAhBD,iCAgBC"}
|
|
@@ -15,11 +15,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
16
16
|
const path_1 = __importDefault(require("path"));
|
|
17
17
|
const scaffold_1 = require("../../testing/scaffold");
|
|
18
|
-
const json_file_1 = require("../../utility/json-file");
|
|
19
18
|
describe('Migrations > Setup specs for testing module', () => {
|
|
20
19
|
const collectionPath = path_1.default.join(__dirname, '../migration-collection.json');
|
|
21
20
|
const defaultProjectName = 'my-lib';
|
|
22
21
|
const schematicName = 'setup-coverage-for-testing-module';
|
|
22
|
+
const testingModuleContext = `// Find any tests included in the "testing" entry point.
|
|
23
|
+
try {
|
|
24
|
+
const testingContext = require.context('../testing/', true, /\\.spec\\.ts$/);
|
|
25
|
+
testingContext.keys().map(testingContext);
|
|
26
|
+
} catch (err) {}`;
|
|
23
27
|
const runner = new testing_1.SchematicTestRunner('migrations', collectionPath);
|
|
24
28
|
let tree;
|
|
25
29
|
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -27,10 +31,6 @@ describe('Migrations > Setup specs for testing module', () => {
|
|
|
27
31
|
name: defaultProjectName,
|
|
28
32
|
});
|
|
29
33
|
}));
|
|
30
|
-
function createTestingModule() {
|
|
31
|
-
tree.create(`projects/${defaultProjectName}/testing/ng-package.json`, `{}`);
|
|
32
|
-
tree.create(`projects/${defaultProjectName}/testing/src/public-api.ts`, ``);
|
|
33
|
-
}
|
|
34
34
|
function runSchematic(name) {
|
|
35
35
|
return runner
|
|
36
36
|
.runSchematicAsync(schematicName, {
|
|
@@ -39,46 +39,58 @@ describe('Migrations > Setup specs for testing module', () => {
|
|
|
39
39
|
.toPromise();
|
|
40
40
|
}
|
|
41
41
|
function validateFiles() {
|
|
42
|
-
const entryPointContents = tree.readContent(`projects/${defaultProjectName}/
|
|
42
|
+
const entryPointContents = tree.readContent(`projects/${defaultProjectName}/src/test.ts`);
|
|
43
43
|
expect(entryPointContents)
|
|
44
|
-
.toEqual(
|
|
44
|
+
.toEqual(`// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
45
|
+
|
|
46
|
+
import 'zone.js';
|
|
47
|
+
import 'zone.js/testing';
|
|
48
|
+
import { getTestBed } from '@angular/core/testing';
|
|
49
|
+
import {
|
|
50
|
+
BrowserDynamicTestingModule,
|
|
51
|
+
platformBrowserDynamicTesting
|
|
52
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
53
|
+
|
|
54
|
+
declare const require: {
|
|
55
|
+
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
56
|
+
keys(): string[];
|
|
57
|
+
<T>(id: string): T;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// First, initialize the Angular testing environment.
|
|
62
|
+
getTestBed().initTestEnvironment(
|
|
63
|
+
BrowserDynamicTestingModule,
|
|
64
|
+
platformBrowserDynamicTesting(),
|
|
65
|
+
{ teardown: { destroyAfterEach: true }},
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
// Then we find all the tests.
|
|
69
|
+
const context = require.context('./', true, /\\.spec\\.ts$/);
|
|
70
|
+
// And load the modules.
|
|
45
71
|
context.keys().map(context);
|
|
72
|
+
|
|
73
|
+
${testingModuleContext}
|
|
46
74
|
`);
|
|
47
|
-
const specTsConfig = new json_file_1.JsonFile(tree, `projects/${defaultProjectName}/tsconfig.spec.json`);
|
|
48
|
-
expect(specTsConfig.get(['files'])).toEqual([
|
|
49
|
-
'src/test.ts',
|
|
50
|
-
'testing/src/test.ts',
|
|
51
|
-
]);
|
|
52
|
-
const libTsConfig = new json_file_1.JsonFile(tree, `projects/${defaultProjectName}/tsconfig.lib.json`);
|
|
53
|
-
expect(libTsConfig.get(['exclude'])).toEqual([
|
|
54
|
-
'src/test.ts',
|
|
55
|
-
'**/*.spec.ts',
|
|
56
|
-
'testing/src/test.ts',
|
|
57
|
-
]);
|
|
58
75
|
}
|
|
59
76
|
it('should setup testing module for code coverage', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
-
createTestingModule();
|
|
61
77
|
yield runSchematic();
|
|
62
78
|
validateFiles();
|
|
63
79
|
}));
|
|
64
|
-
it('should abort if testing module not found', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
-
const updatedTree = yield runSchematic();
|
|
66
|
-
expect(updatedTree.exists(`projects/${defaultProjectName}/testing/src/test.ts`)).toEqual(false);
|
|
67
|
-
}));
|
|
68
|
-
it('should abort if project type is application', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
|
-
tree = yield scaffold_1.createTestApp(runner, {
|
|
70
|
-
defaultProjectName: 'my-app',
|
|
71
|
-
});
|
|
72
|
-
const updatedTree = yield runSchematic('my-app');
|
|
73
|
-
expect(updatedTree.exists('projects/my-app/testing/src/test.ts')).toEqual(false);
|
|
74
|
-
}));
|
|
75
80
|
it('should abort if testing module already setup', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
-
createTestingModule();
|
|
77
81
|
yield runSchematic();
|
|
78
82
|
validateFiles();
|
|
79
83
|
// Run the schematic again.
|
|
80
84
|
yield runSchematic();
|
|
81
85
|
validateFiles();
|
|
82
86
|
}));
|
|
87
|
+
it('should abort if project type is application', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
88
|
+
tree = yield scaffold_1.createTestApp(runner, {
|
|
89
|
+
defaultProjectName: 'my-app',
|
|
90
|
+
});
|
|
91
|
+
const updatedTree = yield runSchematic('my-app');
|
|
92
|
+
const contents = updatedTree.readContent('/src/test.ts');
|
|
93
|
+
expect(contents).not.toContain(testingModuleContext);
|
|
94
|
+
}));
|
|
83
95
|
});
|
|
84
96
|
//# sourceMappingURL=setup-coverage-for-testing-module.schematic.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-coverage-for-testing-module.schematic.spec.js","sourceRoot":"","sources":["../../../../src/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAG4C;AAE5C,gDAAwB;AAExB,qDAA0E;
|
|
1
|
+
{"version":3,"file":"setup-coverage-for-testing-module.schematic.spec.js","sourceRoot":"","sources":["../../../../src/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAG4C;AAE5C,gDAAwB;AAExB,qDAA0E;AAE1E,QAAQ,CAAC,6CAA6C,EAAE,GAAG,EAAE;IAC3D,MAAM,cAAc,GAAG,cAAI,CAA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AAa,CAAC,MAAM,EAAE;YACjC,kBAAkB,EAAE,QAAQ;SAC7B,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEjD,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACvD,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const tree_1 = require("../../utility/tree");
|
|
13
|
+
const workspace_1 = require("../../utility/workspace");
|
|
14
|
+
function updateDependencySection(context, project, tree, section) {
|
|
15
|
+
const libraryPackageJsonPath = `${project.root}/package.json`;
|
|
16
|
+
const libraryPackageJson = JSON.parse(tree_1.readRequiredFile(tree, libraryPackageJsonPath));
|
|
17
|
+
const rootPackageJson = JSON.parse(tree_1.readRequiredFile(tree, 'package.json'));
|
|
18
|
+
if (libraryPackageJson[section]) {
|
|
19
|
+
for (const packageName in libraryPackageJson[section]) {
|
|
20
|
+
const rootVersion = rootPackageJson.dependencies[packageName];
|
|
21
|
+
if (rootVersion.match(/^(\^|~)/)) {
|
|
22
|
+
context.logger.warn(`Package "${packageName}@${rootVersion}" was not set to a specific version in the root 'package.json'. Skipping update to library 'package.json'.`);
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
const rangeMatch = libraryPackageJson[section][packageName].match(/^(\^|~)/);
|
|
26
|
+
const rangeCharacter = rangeMatch ? rangeMatch[0] : '';
|
|
27
|
+
libraryPackageJson[section][packageName] = `${rangeCharacter}${rootVersion}`;
|
|
28
|
+
}
|
|
29
|
+
tree.overwrite(libraryPackageJsonPath, JSON.stringify(libraryPackageJson, undefined, 2));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function updateLibraryDependencies() {
|
|
33
|
+
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const { workspace } = yield workspace_1.getWorkspace(tree);
|
|
35
|
+
const { project } = yield workspace_1.getProject(workspace, workspace.extensions.defaultProject);
|
|
36
|
+
// Only run for libraries.
|
|
37
|
+
/* istanbul ignore if */
|
|
38
|
+
if (project.extensions.projectType !== 'library') {
|
|
39
|
+
context.logger.info('The default project is of type "application". Skipping.');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
updateDependencySection(context, project, tree, 'peerDependencies');
|
|
43
|
+
updateDependencySection(context, project, tree, 'dependencies');
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
exports.default = updateLibraryDependencies;
|
|
47
|
+
//# sourceMappingURL=update-peer-dependencies.schematic.js.map
|
package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-peer-dependencies.schematic.js","sourceRoot":"","sources":["../../../../src/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,6CAAsD;AACtD,uDAAmE;AAEnE,SAAS,uBAAuB,CAC9B,OAAyB,EACzB,OAAqC,EACrC,IAAU,EAC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,MAAM,sBAAU,CAClC,SAAS,EACT,SAAS,CAAC,UAAU,CAAC,cAAwB,CAC9C,CAAC;QAEF,0BAA0B;QAC1B,wBAAwB;QACxB,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE;YAChD,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,yDAAyD,CAC1D,CAAC;YACF,OAAO;SACR;QAED,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC;QACpE,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IAClE,CAAC,CAAA,CAAC;AACJ,CAAC;AArBD,4CAqBC"}
|
package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.spec.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const scaffold_1 = require("../../testing/scaffold");
|
|
18
|
+
describe('Migrations > Update peer dependencies', () => {
|
|
19
|
+
const collectionPath = path_1.default.join(__dirname, '../migration-collection.json');
|
|
20
|
+
const defaultProjectName = 'my-lib';
|
|
21
|
+
const schematicName = 'update-peer-dependencies';
|
|
22
|
+
const runner = new testing_1.SchematicTestRunner('migrations', collectionPath);
|
|
23
|
+
let tree;
|
|
24
|
+
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
tree = yield scaffold_1.createTestLibrary(runner, {
|
|
26
|
+
name: defaultProjectName,
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
function runSchematic(name) {
|
|
30
|
+
return runner
|
|
31
|
+
.runSchematicAsync(schematicName, {
|
|
32
|
+
defaultProjectName: name || defaultProjectName,
|
|
33
|
+
}, tree)
|
|
34
|
+
.toPromise();
|
|
35
|
+
}
|
|
36
|
+
it('should update library peer dependencies', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
+
tree.overwrite('projects/my-lib/package.json', `{
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@angular/core": "^12.0.0"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"moment": "1.0.0",
|
|
43
|
+
"tslib": "^2.0.0"
|
|
44
|
+
}
|
|
45
|
+
}`);
|
|
46
|
+
tree.overwrite('package.json', `{
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@angular/core": "12.2.5",
|
|
49
|
+
"moment": "1.2.3",
|
|
50
|
+
"tslib": "2.5.0"
|
|
51
|
+
}
|
|
52
|
+
}`);
|
|
53
|
+
const updatedTree = yield runSchematic();
|
|
54
|
+
const libraryPackageJson = JSON.parse(updatedTree.readContent('projects/my-lib/package.json'));
|
|
55
|
+
expect(libraryPackageJson.peerDependencies['@angular/core']).toEqual('^12.2.5');
|
|
56
|
+
expect(libraryPackageJson.dependencies.moment).toEqual('1.2.3');
|
|
57
|
+
expect(libraryPackageJson.dependencies.tslib).toEqual('^2.5.0');
|
|
58
|
+
}));
|
|
59
|
+
it('should skip dependencies if they are not specific versions', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
+
tree.overwrite('projects/my-lib/package.json', `{
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@angular/core": "^12.0.0"
|
|
63
|
+
}
|
|
64
|
+
}`);
|
|
65
|
+
tree.overwrite('package.json', `{
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@angular/core": "~12.2.5"
|
|
68
|
+
}
|
|
69
|
+
}`);
|
|
70
|
+
const updatedTree = yield runSchematic();
|
|
71
|
+
const libraryPackageJson = JSON.parse(updatedTree.readContent('projects/my-lib/package.json'));
|
|
72
|
+
expect(libraryPackageJson.peerDependencies['@angular/core']).toEqual('^12.0.0' // <-- Should be unchanged since it was skipped.
|
|
73
|
+
);
|
|
74
|
+
}));
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=update-peer-dependencies.schematic.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-peer-dependencies.schematic.spec.js","sourceRoot":"","sources":["../../../../src/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAG4C;AAE5C,gDAAwB;AAExB,qDAA2D;AAE3D,QAAQ,CAAC,uCAAuC,EAAE,GAAG,EAAE;IACrD,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,CAAC;IAC5E,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACpC,MAAM,aAAa,GAAG,0BAA0B,CAAC;IAEjD,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAErE,IAAI,IAAkB,CAAC;IAEvB,UAAU,CAAC,GAAS,EAAE;QACpB,IAAI,GAAG,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8B,CAAC,CACxD,CAAC;QAEF,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAClE,SAAS,CAAC,gDAAgD;SAC3D,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The contents of this file were copied from '@schematics/angular'.
|
|
3
|
-
* @see https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-file.ts
|
|
4
|
-
*/
|
|
5
|
-
import { JsonValue } from '@angular-devkit/core';
|
|
6
|
-
import { Tree } from '@angular-devkit/schematics';
|
|
7
|
-
export declare type InsertionIndex = (properties: string[]) => number;
|
|
8
|
-
export declare type JsonPath = (string | number)[];
|
|
9
|
-
/**
|
|
10
|
-
* Handles JSONC files (JSON files that include comments).
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export declare class JsonFile {
|
|
14
|
-
private readonly host;
|
|
15
|
-
private readonly path;
|
|
16
|
-
content: string;
|
|
17
|
-
private get JsonAst();
|
|
18
|
-
private _jsonAst;
|
|
19
|
-
constructor(host: Tree, path: string);
|
|
20
|
-
get(jsonPath: JsonPath): any;
|
|
21
|
-
modify(jsonPath: JsonPath, value: JsonValue | undefined, insertInOrder?: InsertionIndex | false): void;
|
|
22
|
-
remove(jsonPath: JsonPath): void;
|
|
23
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.JsonFile = void 0;
|
|
5
|
-
const jsonc_parser_1 = require("jsonc-parser");
|
|
6
|
-
/**
|
|
7
|
-
* Handles JSONC files (JSON files that include comments).
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
class JsonFile {
|
|
11
|
-
constructor(host, path) {
|
|
12
|
-
this.host = host;
|
|
13
|
-
this.path = path;
|
|
14
|
-
const buffer = this.host.read(this.path);
|
|
15
|
-
if (buffer) {
|
|
16
|
-
this.content = buffer.toString();
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error(`Could not read '${path}'.`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
get JsonAst() {
|
|
23
|
-
if (this._jsonAst) {
|
|
24
|
-
return this._jsonAst;
|
|
25
|
-
}
|
|
26
|
-
const errors = [];
|
|
27
|
-
this._jsonAst = jsonc_parser_1.parseTree(this.content, errors, {
|
|
28
|
-
allowTrailingComma: true,
|
|
29
|
-
});
|
|
30
|
-
if (errors.length) {
|
|
31
|
-
const { error, offset } = errors[0];
|
|
32
|
-
throw new Error(`Failed to parse "${this.path}" as JSON AST Object. ${jsonc_parser_1.printParseErrorCode(error)} at location: ${offset}.`);
|
|
33
|
-
}
|
|
34
|
-
return this._jsonAst;
|
|
35
|
-
}
|
|
36
|
-
get(jsonPath) {
|
|
37
|
-
const jsonAstNode = this.JsonAst;
|
|
38
|
-
if (!jsonAstNode) {
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
if (jsonPath.length === 0) {
|
|
42
|
-
return jsonc_parser_1.getNodeValue(jsonAstNode);
|
|
43
|
-
}
|
|
44
|
-
const node = jsonc_parser_1.findNodeAtLocation(jsonAstNode, jsonPath);
|
|
45
|
-
return node === undefined ? undefined : jsonc_parser_1.getNodeValue(node);
|
|
46
|
-
}
|
|
47
|
-
modify(jsonPath, value, insertInOrder) {
|
|
48
|
-
let getInsertionIndex;
|
|
49
|
-
if (insertInOrder === undefined) {
|
|
50
|
-
const property = jsonPath.slice(-1)[0];
|
|
51
|
-
getInsertionIndex = (properties) => [...properties, property].sort().findIndex((p) => p === property);
|
|
52
|
-
}
|
|
53
|
-
else if (insertInOrder !== false) {
|
|
54
|
-
getInsertionIndex = insertInOrder;
|
|
55
|
-
}
|
|
56
|
-
const edits = jsonc_parser_1.modify(this.content, jsonPath, value, {
|
|
57
|
-
getInsertionIndex,
|
|
58
|
-
formattingOptions: {
|
|
59
|
-
insertSpaces: true,
|
|
60
|
-
tabSize: 2,
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
this.content = jsonc_parser_1.applyEdits(this.content, edits);
|
|
64
|
-
this.host.overwrite(this.path, this.content);
|
|
65
|
-
this._jsonAst = undefined;
|
|
66
|
-
}
|
|
67
|
-
remove(jsonPath) {
|
|
68
|
-
if (this.get(jsonPath) !== undefined) {
|
|
69
|
-
this.modify(jsonPath, undefined);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.JsonFile = JsonFile;
|
|
74
|
-
//# sourceMappingURL=json-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json-file.js","sourceRoot":"","sources":["../../../src/schematics/utility/json-file.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAS1B,+CASsB;AAKtB;;;GAGG;AACH,MAAa,QAAQ;IA4BnB,YAA6B,IAAU,EAAmB,IAAY;QAAzC,SAAI,GAAJ,IAAI,CAAM;QAAmB,SAAI,GAAJ,IAAI,CAAQ;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;SAClC;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,IAAI,CAAC,CAAC;SAC9C;IACH,CAAC;IAhCD,IAAY,OAAO;QACjB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;SACtB;QAED,MAAM,MAAM,GAAiB,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,wBAAS,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;YAC9C,kBAAkB,E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