Skip to content

Commit

Permalink
chore: updated yarn lock and deps for schematics
Browse files Browse the repository at this point in the history
  • Loading branch information
pimenovoleg committed Aug 9, 2019
1 parent bd831fe commit 4f5cc53
Show file tree
Hide file tree
Showing 9 changed files with 1,045 additions and 224 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# http://yaml-online-parser.appspot.com/

var_1: &default_docker_image circleci/node:10.12-browsers
var_2: &cache_key mosaic-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.5.0
var_2: &cache_key mosaic-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0

var_3: &job_defaults
working_directory: ~/mosaic
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"url": "https://github.com/positive-js/mosaic.git"
},
"engines": {
"node": ">= 8",
"npm": ">=5"
"node": ">= 10",
"npm": ">=6"
},
"requiredAngularVersion": ">=8.0.0",
"dependencies": {
"@angular/animations": "^8.0.0",
"@angular/cdk": "^8.0.1",
"@angular/cdk": "^8.1.2",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
Expand All @@ -33,6 +33,7 @@
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.802.1",
"@angular-devkit/core": "^8.0.1",
"@angular-devkit/schematics": "^8.0.1",
"@angular/compiler-cli": "^8.0.0",
Expand Down Expand Up @@ -64,8 +65,8 @@
"browser-sync": "^2.26.3",
"chalk": "^2.4.1",
"conventional-changelog": "^3.0.5",
"dgeni": "^0.4.10",
"dgeni-packages": "^0.26.12",
"dgeni": "^0.4.12",
"dgeni-packages": "^0.28.1",
"dotenv": "^6.2.0",
"fs-extra": "^5.0.0",
"glob": "^7.1.3",
Expand Down Expand Up @@ -126,15 +127,15 @@
"ts-node": "4.1.0",
"tsconfig-paths": "^3.7.0",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"tslint": "^5.15.0",
"tslint": "^5.18.0",
"typescript": "~3.4.x",
"typescript-tslint-plugin": "^0.2.0",
"uglify-js": "^2.8.29",
"url-loader": "^1.1.2",
"wallaby-webpack": "^3.9.13",
"webpack": "^4.27.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.9"
"webpack": "^4.39.1",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3.7.2"
},
"scripts": {
"serve:dev-app": "gulp serve:devapp",
Expand Down
13 changes: 8 additions & 5 deletions packages/cdk/schematics/testing/test-app.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { Tree } from '@angular-devkit/schematics';
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';


/** Create a base app used for testing. */
export function createTestApp(runner: SchematicTestRunner, appOptions = {}): UnitTestTree {
export async function createTestApp(runner: SchematicTestRunner, appOptions = {}, tree?: Tree):
Promise<UnitTestTree> {
const workspaceTree = runner.runExternalSchematic('@schematics/angular', 'workspace', {
name: 'workspace',
version: '7.0.0',
version: '8.0.0',
newProjectRoot: 'projects'
});
}, tree);

return runner.runExternalSchematic('@schematics/angular', 'application',
{...appOptions, name: 'mosaic'}, workspaceTree);
return runner.runExternalSchematicAsync('@schematics/angular', 'application',
{name: 'material', ...appOptions}, workspaceTree).toPromise();
}

6 changes: 4 additions & 2 deletions packages/mosaic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@
"homepage": "https://github.com/positive-js/mosaic#readme",
"peerDependencies": {
"@angular/animations": "0.0.0-NG",
"@angular/cdk": "0.0.0-NG",
"@angular/core": "0.0.0-NG",
"@angular/common": "0.0.0-NG",
"@angular/forms": "0.0.0-NG",
"@angular/cdk": "0.0.0-NG",
"@ptsecurity/cdk": "0.0.0-PLACEHOLDER",
"@ptsecurity/mosaic-moment-adapter": "0.0.0-PLACEHOLDER"
"@ptsecurity/mosaic-moment-adapter": "0.0.0-PLACEHOLDER",
"@ptsecurity/mosaic-icons": "^3.0.0"
},
"dependencies": {
"tslib": "^1.7.1"
},
"schematics": "./schematics/collection.json",
"sideEffects": false
}
6 changes: 0 additions & 6 deletions packages/mosaic/schematics/migration.json

This file was deleted.

45 changes: 45 additions & 0 deletions packages/mosaic/schematics/ng-add/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// import { Tree } from '@angular-devkit/schematics';
// import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
// import { createTestApp } from '@ptsecurity/cdk/schematics';
// import { removePackageJsonDependency } from '@schematics/angular/utility/dependencies';
// import { getFileContent } from '@schematics/angular/utility/test';
//
//
// xdescribe('ng-add schematic', () => {
//
// let runner: SchematicTestRunner;
// let appTree: Tree;
//
// beforeEach(async () => {
// runner = new SchematicTestRunner('schematics', require.resolve('../collection.json'));
// appTree = await createTestApp(runner);
// });
//
// it('should update package.json', async () => {
//
// removePackageJsonDependency(appTree, '@angular/animations');
//
// const tree = await runner.runSchematicAsync('ng-add', {}, appTree).toPromise();
// const packageJson = JSON.parse(getFileContent(tree, '/package.json'));
// const dependencies = packageJson.dependencies;
// const angularCoreVersion = dependencies['@angular/core'];
//
// expect(dependencies['@angular/cdk']).toBeDefined();
// expect(dependencies['@ptsecurity/mosaic']).toBeDefined();
// expect(dependencies['@angular/forms'])
// .toBe(
// angularCoreVersion,
// 'Expected the @angular/forms package to have the same version as @angular/core.');
// expect(dependencies['@angular/animations'])
// .toBe(
// angularCoreVersion,
// 'Expected the @angular/animations package to have the same version as @angular/core.');
//
// expect(Object.keys(dependencies))
// .toEqual(
// Object.keys(dependencies).sort(),
// 'Expected the modified "dependencies" to be sorted alphabetically.');
//
// expect(runner.tasks.some((task) => task.name === 'run-schematic')).toBe(true);
// });
// });
8 changes: 2 additions & 6 deletions packages/mosaic/schematics/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"baseUrl": ".",
"paths": {
"@angular/cdk/schematics": [
"@ptsecurity/cdk/schematics": [
"../../cdk/schematics"
]
}
Expand All @@ -34,10 +34,6 @@
"exclude": [
"**/*.spec.ts",
// Exclude the test-setup utility files. Those should not be part of the output.
"test-setup/**/*.ts",
// Exclude template files that will be copied by the schematics. Those are not valid TS.
"ng-generate/*/files/**/*.ts",
// Exclude all test-case files because those should not be included in the schematics output.
"ng-update/test-cases/**/*.ts"
"test-setup/**/*.ts"
]
}
4 changes: 2 additions & 2 deletions packages/mosaic/tooltip/tooltip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export class McTooltipComponent {
positions: ConnectionPositionPair[] = [ ...DEFAULT_4_POSITIONS ];
classMap = {};
isTitleString: boolean;
showTid: number;
hideTid: number;
showTid: any;
hideTid: any;
availablePositions: any;
$visible: Observable<boolean>;

Expand Down
Loading

0 comments on commit 4f5cc53

Please sign in to comment.