Skip to content

Commit

Permalink
feat(nativescript): {N} 7 and Angular 10.1 (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker authored Sep 8, 2020
1 parent bba3e85 commit c43aa72
Show file tree
Hide file tree
Showing 58 changed files with 1,081 additions and 1,132 deletions.
62 changes: 31 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nstudio/xplat-source",
"version": "10.0.6",
"version": "10.1.0",
"description": "Cross-platform (xplat) tools for Nx workspaces.",
"homepage": "https://nstudio.io/xplat",
"private": true,
Expand Down Expand Up @@ -33,33 +33,33 @@
},
"license": "MIT",
"devDependencies": {
"@angular-devkit/architect": "~0.1000.4",
"@angular-devkit/build-angular": "~0.1000.4",
"@angular-devkit/build-ng-packagr": "~0.1000.4",
"@angular-devkit/build-optimizer": "~0.1000.4",
"@angular-devkit/build-webpack": "~0.1000.4",
"@angular-devkit/core": "~10.0.0",
"@angular-devkit/schematics": "~10.0.0",
"@angular/cli": "~10.0.0",
"@angular/common": "~10.0.0",
"@angular/compiler": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@angular/core": "~10.0.0",
"@angular/forms": "~10.0.0",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/router": "~10.0.0",
"@angular/service-worker": "~10.0.0",
"@angular/upgrade": "~10.0.0",
"@angular-devkit/architect": "~0.1001.0",
"@angular-devkit/build-angular": "~0.1001.0",
"@angular-devkit/build-ng-packagr": "~0.1001.0",
"@angular-devkit/build-optimizer": "~0.1001.0",
"@angular-devkit/build-webpack": "~0.1001.0",
"@angular-devkit/core": "~10.1.0",
"@angular-devkit/schematics": "~10.1.0",
"@angular/cli": "~10.1.0",
"@angular/common": "~10.1.0",
"@angular/compiler": "~10.1.0",
"@angular/compiler-cli": "~10.1.0",
"@angular/core": "~10.1.0",
"@angular/forms": "~10.1.0",
"@angular/platform-browser": "~10.1.0",
"@angular/platform-browser-dynamic": "~10.1.0",
"@angular/router": "~10.1.0",
"@angular/service-worker": "~10.1.0",
"@angular/upgrade": "~10.1.0",
"@cypress/webpack-preprocessor": "^5.4.2",
"@nrwl/angular": "~10.0.0",
"@nrwl/express": "~10.0.0",
"@nrwl/nest": "~10.0.0",
"@nrwl/node": "~10.0.0",
"@nrwl/react": "~10.0.0",
"@nrwl/web": "~10.0.0",
"@nrwl/workspace": "~10.0.0",
"@schematics/angular": "~10.0.0",
"@nrwl/angular": "~10.1.0",
"@nrwl/express": "~10.1.0",
"@nrwl/nest": "~10.1.0",
"@nrwl/node": "~10.1.0",
"@nrwl/react": "~10.1.0",
"@nrwl/web": "~10.1.0",
"@nrwl/workspace": "~10.1.0",
"@schematics/angular": "~10.1.0",
"@types/express": "~4.17.0",
"@types/jasmine": "~3.5.11",
"@types/jasminewd2": "~2.0.3",
Expand All @@ -76,8 +76,8 @@
"circular-dependency-plugin": "~5.2.0",
"codelyzer": "~6.0.0",
"commitizen": "~4.1.2",
"conventional-changelog-cli": "~2.0.31",
"copy-webpack-plugin": "~6.0.0",
"conventional-changelog-cli": "~2.1.0",
"copy-webpack-plugin": "~6.1.0",
"cosmiconfig": "~6.0.0",
"cypress": "~4.11.0",
"cz-conventional-changelog": "~3.2.0",
Expand Down Expand Up @@ -108,7 +108,7 @@
"karma-jasmine-html-reporter": "~1.5.4",
"karma-webpack": "~4.0.2",
"license-webpack-plugin": "~2.3.0",
"ng-packagr": "~10.0.0",
"ng-packagr": "~10.1.0",
"ngrx-store-freeze": "~0.2.4",
"npm-run-all": "~4.1.5",
"opn": "~6.0.0",
Expand Down Expand Up @@ -141,7 +141,7 @@
"xml2js": "~0.4.23",
"yargs": "~15.4.0",
"yargs-parser": "~18.1.3",
"zone.js": "~0.10.0"
"zone.js": "~0.11.1"
},
"jest": {
"modulePathIgnorePatterns": [
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"migrations": "./migrations.json"
},
"dependencies": {
"@nrwl/angular": "^10.0.0"
"@nrwl/angular": "^10.1.0"
},
"peerDependencies": {
"@nstudio/xplat": "*"
Expand Down
12 changes: 6 additions & 6 deletions packages/angular/src/schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function (options: Schema) {
scripts[`start.${platformApp}`] = `nx serve ${options.name}`;
return updatePackageScripts(tree, scripts);
},
formatFiles({ skipFormat: options.skipFormat }),
<any>formatFiles({ skipFormat: options.skipFormat }),
]);
}

Expand Down Expand Up @@ -144,7 +144,7 @@ exports.config = defaultConfig;
}
return updateWorkspace({ projects: workspaceConfig.projects })(
tree,
context
<any>context
);
};
}
Expand All @@ -153,11 +153,11 @@ exports.config = defaultConfig;
* Add headless options to e2e tests
* @param options
*/
function addHeadlessE2e(options: Schema) {
function addHeadlessE2e(options: Schema): Rule {
const framework: 'protractor' | 'cypress' | 'none' = options.e2eTestRunner;
switch (framework) {
case 'protractor':
return addProtractorCiConfig(options);
return <any>addProtractorCiConfig(options);

default:
return noop();
Expand All @@ -181,7 +181,7 @@ function addAppFiles(options: Schema, extra: string = ''): Rule {
);
}

function adjustAppFiles(options: Schema, tree: Tree) {
function adjustAppFiles(options: Schema, tree: Tree): Rule {
const directory = options.directory ? `${options.directory}/` : '';
tree.overwrite(
`/apps/${directory}${options.name}/src/index.html`,
Expand Down Expand Up @@ -238,7 +238,7 @@ function adjustAppFiles(options: Schema, tree: Tree) {
}
}
}
return updateWorkspace({ projects: workspaceConfig.projects });
return <any>updateWorkspace({ projects: workspaceConfig.projects });
}

function indexContent(name: string) {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/schematics/elements/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default function (options: ElementsOptions) {
},
},
},
})(tree, context);
})(tree, <any>context);
}
},
// update dependencies
Expand All @@ -200,7 +200,7 @@ export default function (options: ElementsOptions) {
return noop();
}
},
formatFiles({ skipFormat: options.skipFormat }),
<any>formatFiles({ skipFormat: options.skipFormat }),
]);
}

Expand Down Expand Up @@ -248,7 +248,7 @@ function updateWorkspaceSupport(
};

return json;
})(tree, context);
})(tree, <any>context);
}

function createCustomElementList(componentSymbols) {
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const xplatVersion = '*';
export const nxVersion = '~10.0.0';
export const angularVersion = '~10.0.0';
export const angularDevkitVersion = '~0.1000.6';
export const nxVersion = '~10.1.0';
export const angularVersion = '~10.1.0';
export const angularDevkitVersion = '~0.1001.0';
export const ngxTranslateVersion = '~13.0.0';
export const ngxTranslateHttpVersion = '~6.0.0';
export const coreJsVersion = '^3.6.5';
export const rxjsVersion = '~6.6.0';
export const zonejsVersion = '~0.10.2';
export const zonejsVersion = '~0.11.1';
export const codelyzerVersion = '~6.0.0';
export const jestJasmine2 = '~25.2.0';
export const jestPresetAngular = '~8.1.2';
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/src/utils/xplat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export namespace XplatAngularHelpers {
return (tree: Tree, context: SchematicContext) => {
const prefix = getPrefix();

return updateJsonInTree('tslint.json', (json) => {
return <any>updateJsonInTree('tslint.json', (json) => {
json.rules = json.rules || {};
// remove forin rule as collides with LogService
delete json.rules['forin'];
Expand All @@ -474,7 +474,7 @@ export namespace XplatAngularHelpers {
];

return json;
})(tree, context);
})(tree, <any>context);
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ function updateRootPackage(tree: Tree, context: SchematicContext) {
};

return json;
})(tree, context);
})(tree, <any>context);
}

export default function (): Rule {
return chain([updateElectronApps, updateRootPackage]);
return chain([updateElectronApps, <any>updateRootPackage]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function (options: XplatElectrontHelpers.SchemaApp) {
delete projects[electronAppName].architect['extract-i18n'];
delete projects[electronAppName].architect['test'];
delete projects[electronAppName].architect['lint'];
return updateWorkspace({ projects })(tree, context);
return updateWorkspace({ projects })(tree, <any>context);
},
(tree: Tree) => {
const projects = {};
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-angular/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const xplatVersion = '*';
export const nxVersion = '~10.0.0';
export const nxVersion = '~10.1.0';
2 changes: 1 addition & 1 deletion packages/electron/src/schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function (options: XplatElectrontHelpers.SchemaApp) {
delete projects[electronAppName].architect['extract-i18n'];
delete projects[electronAppName].architect['test'];
delete projects[electronAppName].architect['lint'];
return updateWorkspace({ projects })(tree, context);
return updateWorkspace({ projects })(tree, <any>context);
},
(tree: Tree) => {
const projects = {};
Expand Down
4 changes: 2 additions & 2 deletions packages/focus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"migrations": "./migrations.json"
},
"dependencies": {
"@angular-devkit/core": "~10.0.0",
"@angular-devkit/schematics": "~10.0.0",
"@angular-devkit/core": "~10.1.0",
"@angular-devkit/schematics": "~10.1.0",
"@nstudio/xplat-utils": "*",
"xml2js": "~0.4.23"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/focus/src/schematics/mode/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/schema",
"id": "mode",
"title": "mode schema",
"title": "focus schema",
"type": "object",
"properties": {
"name": {
Expand Down
15 changes: 11 additions & 4 deletions packages/focus/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,22 @@ export namespace FocusHelpers {
}
}
// switch on/off libs/packages
// support multiple lib/package focus so track what is handled per loop to not reset one already set
const handledPlatforms: any = {};
for (const target of platforms) {
for (const p of options.allLibs) {
const libName = p.replace('**/libs/', '');
userUpdates[p] = libName === target ? false : true;
if (!handledPlatforms[target]) {
const libName = p.replace('**/libs/', '');
userUpdates[p] = libName === target ? false : true;
}
}
for (const p of options.allPackages) {
const packageName = p.replace('**/packages/', '');
userUpdates[p] = packageName === target ? false : true;
if (!handledPlatforms[target]) {
const packageName = p.replace('**/packages/', '');
userUpdates[p] = packageName === target ? false : true;
}
}
handledPlatforms[target] = true;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/ionic-angular/src/schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export default function (options: ApplicationOptions) {
},
},
};
return updateWorkspace({ projects })(tree, context);
return updateWorkspace({ projects })(tree, <any>context);
},
(tree: Tree) => {
const projects = {};
Expand All @@ -290,7 +290,7 @@ export default function (options: ApplicationOptions) {
};
return updateNxProjects(tree, projects);
},
formatFiles({ skipFormat: options.skipFormat }),
<any>formatFiles({ skipFormat: options.skipFormat }),
]);
}

Expand Down
8 changes: 4 additions & 4 deletions packages/ionic-angular/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export const ionicNativeVersion = '~5.23.0';
export const capacitorVersion = '~2.4.0';
export const ngDevKitArchitect = '~0.1000.6';
export const ngDevKitBuild = '~0.1000.6';
export const ngDevKitCore = '~10.0.0';
export const ngDevKitSchematics = '~10.0.0';
export const ngDevKitCore = '~10.1.0';
export const ngDevKitSchematics = '~10.1.0';

export const jasmineCoreVersion = '~3.6.0';
export const jasmineSpecVersion = '~5.0.2';
Expand All @@ -17,8 +17,8 @@ export const karmaJasmineVersion = '~4.0.1';
export const karmaJasmineHtmlVersion = '^1.5.2';
export const typescriptVersion = '~3.9.0';

export const angularVersion = '~10.0.0';
export const angularDevkitVersion = '~0.1000.6';
export const angularVersion = '~10.1.0';
export const angularDevkitVersion = '~0.1001.0';
export const ngxTranslateVersion = '~13.0.0';
export const ngxTranslateHttpVersion = '~6.0.0';
export const coreJsVersion = '^3.6.5';
Expand Down
4 changes: 2 additions & 2 deletions packages/ionic/src/schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function (options: Schema) {
projectType: 'application',
prefix: getPrefix(),
};
return updateWorkspace({ projects })(tree, context);
return <any>updateWorkspace({ projects })(tree, <any>context);
},
(tree: Tree) => {
const projects = {};
Expand All @@ -102,7 +102,7 @@ export default function (options: Schema) {
};
return updateNxProjects(tree, projects);
},
formatFiles({ skipFormat: options.skipFormat }),
<any>formatFiles({ skipFormat: options.skipFormat }),
]);
}

Expand Down
Loading

0 comments on commit c43aa72

Please sign in to comment.