Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

feat(@angular-devkit/schematics): change schema validation to AJV #334

Merged
merged 10 commits into from
Jan 11, 2018
Merged

feat(@angular-devkit/schematics): change schema validation to AJV #334

merged 10 commits into from
Jan 11, 2018

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Dec 14, 2017

Followup from #280

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@filipesilva filipesilva changed the title Ajv standard fs feat(@angular-devkit/schematics): change schema validation to AJV Dec 14, 2017
@@ -105,6 +105,13 @@ export interface Tree {
}


namespace Tree {
export function isTree(maybeTree: object): maybeTree is Tree {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be where useful (instead of using TreeSymbol in Tree). It also communicates the types better to TypeScript. It doens't have to be part of this PR.

.subscribe(done, done.fail);
});

it('works synchronously', done => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a way to fail synchronously if it's not sync. Otherwise you can't really know if it is sync or async and need to always prepare for it to be async.

Copy link
Contributor

@hansl hansl Dec 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add the check, but this is used internally by ourselves so I don't see the need. We can always use the Observable as an Observable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment with this information.

@@ -13,3 +13,6 @@ export { FallbackEngineHost } from './fallback-engine-host';
export { FileSystemEngineHost } from './file-system-engine-host';
export { NodeModulesEngineHost } from './node-module-engine-host';
export { NodeModulesTestEngineHost } from './node-modules-test-engine-host';

export { AjvSchemaRegistry } from './ajv-option-transform';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're going to have to move this to core if we want to share code with Build Facade or other things.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do this tomorrow :)

scripts/test.ts Outdated
@@ -25,6 +25,11 @@ require('source-map-support').install({
});


interface CoverageLocation {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of the test: add an istanbul bootstrap script commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should. I was just pushing stuff as quickly as I could :( sorry. I normally clean up before submitting for review.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was leaving the comment here mostly for myself when reworking this PR. I'll move it to the other commit.

name: 'path',
formatter: {
async: false,
validate: (path: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should normalize the path instead of verifying if it's normalized already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't do that in a format though. It just verifies that the data is following a format, it can't modify it.

hansl
hansl previously approved these changes Jan 10, 2018
clydin
clydin previously approved these changes Jan 10, 2018
import { htmlSelectorRe } from './html-selector';


const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the ember references be removed? The existing CLI logic has them but that was really more of a carryover from the original ember code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@filipesilva filipesilva dismissed stale reviews from clydin and hansl via 7995ef3 January 10, 2018 20:40
@hansl
Copy link
Contributor

hansl commented Jan 11, 2018

CLA: All authors of this PR have signed the CLA, so I'm overriding it.

@hansl hansl merged commit e9fa113 into angular:master Jan 11, 2018
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Jan 15, 2018
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Jan 15, 2018
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Jan 15, 2018
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Jan 15, 2018
Brocco pushed a commit to angular/angular-cli that referenced this pull request Jan 18, 2018
Brocco pushed a commit to angular/angular-cli that referenced this pull request Jan 19, 2018
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this pull request Apr 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants