Skip to content

chore: improve dependencies #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename "$0")"
Expand All @@ -23,8 +25,7 @@ if [ -z "$husky_skip_init" ]; then

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
exit $exitCode
fi

exit 0
exit $exitCode
fi
297 changes: 5 additions & 292 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,296 +1,9 @@
{
"version": 1,
"cli": {
"analytics": false
},
"defaultProject": "example-app",
"version": 2,
"projects": {
"example-app": {
"projectType": "application",
"root": "apps/example-app",
"sourceRoot": "apps/example-app/src",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/apps/example-app",
"index": "apps/example-app/src/index.html",
"main": "apps/example-app/src/main.ts",
"polyfills": "apps/example-app/src/polyfills.ts",
"tsConfig": "apps/example-app/tsconfig.app.json",
"assets": ["apps/example-app/src/favicon.ico", "apps/example-app/src/assets"],
"styles": ["apps/example-app/src/styles.css"],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "apps/example-app/src/environments/environment.ts",
"with": "apps/example-app/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
},
"outputs": ["{options.outputPath}"]
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "example-app:build"
},
"configurations": {
"production": {
"browserTarget": "example-app:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "example-app:build"
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/example-app/**/*.ts",
"apps/example-app/**/*.html",
"apps/example-app/src/**/*.html",
"apps/example-app/src/**/*.html",
"apps/example-app/src/**/*.html"
]
},
"outputs": ["{options.outputFile}"]
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "apps/example-app/jest.config.js"
},
"outputs": ["coverage/"]
}
}
},
"example-app-karma": {
"projectType": "application",
"root": "apps/example-app-karma",
"sourceRoot": "apps/example-app-karma/src",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/apps/example-app-karma",
"index": "apps/example-app-karma/src/index.html",
"main": "apps/example-app-karma/src/main.ts",
"polyfills": "apps/example-app-karma/src/polyfills.ts",
"tsConfig": "apps/example-app-karma/tsconfig.app.json",
"assets": ["apps/example-app-karma/src/favicon.ico", "apps/example-app-karma/src/assets"],
"styles": [],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "apps/example-app-karma/src/environments/environment.ts",
"with": "apps/example-app-karma/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
},
"outputs": ["{options.outputPath}"]
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "example-app-karma:build"
},
"configurations": {
"production": {
"browserTarget": "example-app-karma:build:production"
}
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/example-app-karma/**/*.ts",
"apps/example-app-karma/**/*.html",
"apps/example-app-karma/src/**/*.html",
"apps/example-app-karma/src/**/*.html",
"apps/example-app-karma/src/**/*.html"
]
},
"outputs": ["{options.outputFile}"]
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "apps/example-app-karma/src/test.ts",
"tsConfig": "apps/example-app-karma/tsconfig.spec.json",
"polyfills": "apps/example-app-karma/src/polyfills.ts",
"karmaConfig": "apps/example-app-karma/karma.conf.js",
"styles": [],
"scripts": [],
"assets": []
}
}
}
},
"jest-utils": {
"root": "projects/jest-utils",
"sourceRoot": "projects/jest-utils/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build-package": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/jest-utils/tsconfig.lib.json",
"project": "projects/jest-utils/ng-package.json"
},
"configurations": {
"production": {
"project": "projects/jest-utils/ng-package.json",
"tsConfig": "projects/jest-utils/tsconfig.lib.json"
}
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"projects/jest-utils/**/*.ts",
"projects/jest-utils/**/*.html",
"projects/jest-utils/src/**/*.html",
"projects/jest-utils/src/**/*.html",
"projects/jest-utils/src/**/*.html"
]
},
"outputs": ["{options.outputFile}"]
},
"build": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"parallel": false,
"commands": [
{
"command": "ng run jest-utils:build-package"
}
]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "projects/jest-utils/jest.config.js"
},
"outputs": ["coverage/projects/jest-utils"]
}
}
},
"testing-library": {
"root": "projects/testing-library",
"sourceRoot": "projects/testing-library/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build-package": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/testing-library/tsconfig.lib.json",
"project": "projects/testing-library/ng-package.json"
},
"configurations": {
"production": {
"project": "projects/testing-library/ng-package.json",
"tsConfig": "projects/testing-library/tsconfig.lib.json"
}
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"projects/testing-library/**/*.ts",
"projects/testing-library/**/*.html",
"projects/testing-library/src/**/*.html",
"projects/testing-library/src/**/*.html",
"projects/testing-library/src/**/*.html"
]
},
"outputs": ["{options.outputFile}"]
},
"build": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"parallel": false,
"commands": [
{
"command": "ng run testing-library:build-package"
},
{
"command": "npm run build:schematics"
},
{
"command": "cpy ./README.md ./dist/@testing-library/angular"
}
]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "projects/testing-library/jest.config.js"
},
"outputs": ["coverage/projects/testing-library"]
}
}
}
"example-app": "apps/example-app",
"example-app-karma": "apps/example-app-karma",
"jest-utils": "projects/jest-utils",
"testing-library": "projects/testing-library"
}
}
2 changes: 1 addition & 1 deletion apps/example-app/src/app/examples/03-forms.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test('is possible to fill in a form and verify error messages (with the help of
userEvent.selectOptions(colorControl, 'G');

expect(screen.queryByText('name is required')).not.toBeInTheDocument();
expect(screen.queryByText('score must be lesser than 10')).toBeInTheDocument();
expect(screen.getByText('score must be lesser than 10')).toBeInTheDocument();
expect(screen.queryByText('color is required')).not.toBeInTheDocument();

expect(scoreControl).toBeInvalid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import userEvent from '@testing-library/user-event';
import { MaterialModule } from '../material.module';
import { MaterialFormsComponent } from './04-forms-with-material';


test('is possible to fill in a form and verify error messages (with the help of jest-dom https://testing-library.com/docs/ecosystem-jest-dom)', async () => {
const { fixture } = await render(MaterialFormsComponent, {
imports: [MaterialModule],
Expand All @@ -26,7 +25,7 @@ test('is possible to fill in a form and verify error messages (with the help of
userEvent.click(screen.getByText(/green/i));

expect(screen.queryByText('name is required')).not.toBeInTheDocument();
expect(screen.queryByText('score must be lesser than 10')).toBeInTheDocument();
expect(screen.getByText('score must be lesser than 10')).toBeInTheDocument();
expect(screen.queryByText('color is required')).not.toBeInTheDocument();

expect(scoreControl).toBeInvalid();
Expand Down Expand Up @@ -56,8 +55,8 @@ test('set and show pre-set form values', async () => {
fixture.componentInstance.form.setValue({
name: 'Max',
score: 4,
color: 'B'
})
color: 'B',
});
detectChanges();

const nameControl = screen.getByLabelText(/name/i);
Expand Down
Loading