Skip to content

Commit

Permalink
Upgrading other dev packages (#248)
Browse files Browse the repository at this point in the history
* Upgrading other dev packages

* Fixing linter errors
  • Loading branch information
mtlynch committed Nov 29, 2018
1 parent 1cba19c commit 7c2da7c
Show file tree
Hide file tree
Showing 9 changed files with 1,316 additions and 730 deletions.
1,992 changes: 1,292 additions & 700 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "7.1.0",
"@angular/compiler-cli": "7.1.1",
"@types/jasmine": "2.8.2",
"@types/node": "^8.9.5",
"codelyzer": "^4.2.1",
"@types/jasmine": "3.3.0",
"@types/node": "^10.12.10",
"codelyzer": "^4.5.0",
"cssbeautify-cli": "^0.5.3",
"jasmine-core": "~2.8.0",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.4.2",
"karma-jasmine": "^1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.3.0",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^5.4.1",
"scssfmt": "^1.0.6",
"ts-node": "~3.3.0",
"ts-node": "~7.0.1",
"tslint": "~5.11.0",
"tslint-config-airbnb": "^5.8.0",
"tslint-config-airbnb": "^5.11.1",
"typescript": "3.1.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export class MockRecipeDataService {
}
}


describe('RecipeListComponent', () => {
let component: RecipeListComponent;
let fixture: ComponentFixture<RecipeListComponent>;
Expand Down
6 changes: 3 additions & 3 deletions src/app/_components/recipe-list/recipe-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ export class RecipeListComponent implements OnInit {
updateSearchParams(rawKeywords: string) {
this.searchParams = this.parseSearchQuery.transform(rawKeywords);
this.filterRecipes();
this.http.get('/registerQuery?q=' + rawKeywords).subscribe(
() => {},
this.http.get(`/registerQuery?q=${rawKeywords}`).subscribe(
() => { },
(error) => {
console.log(error);
},
() => {},
() => { },
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('HighlightedResultPipe', () => {
expect(pipe.transform('Loaded Keto Cauliflower Bowl', ['loaded', 'k']))
.toBe('<mark>Loaded</mark> <mark>K</mark>eto Cauliflower Bowl');
});

it('should match when keywords overlap in their match', () => {
expect(pipe.transform('jalapeno salad', ['jala', 'lapeno'])).toBe('<mark>jalapeno</mark> salad');
});
Expand Down
5 changes: 3 additions & 2 deletions src/app/_pipes/root-domain/root-domain.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export class RootDomainPipe implements PipeTransform {
const domainsPartsLength = domainParts.length;

if (domainsPartsLength > 2) {
domain = domainParts[domainsPartsLength - 2] + '.' +
domainParts[domainsPartsLength - 1];
domain = domainParts[domainsPartsLength - 2];
domain += '.';
domain += domainParts[domainsPartsLength - 1];
}
return domain;
}
Expand Down
9 changes: 5 additions & 4 deletions src/app/_pipes/search/search.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ function recipeMatchesSearchParams(recipe: any, searchParams: SearchParams) {
return true;
}

function searchTargetFromRecipe(recipe: any) : string {
function searchTargetFromRecipe(recipe: any): string {
// Concatenate all recipe words together, separating elements with single
// pipe characters.
let words = recipe.title;
if (recipe.ingredients) {
words += '|' + recipe.ingredients.join('|');
words += '|';
words += recipe.ingredients.join('|');
}
return words.toLowerCase();
}

function searchTargetContainsAllKeywords(searchTarget: string, keywords: string[]) : boolean {
function searchTargetContainsAllKeywords(searchTarget: string, keywords: string[]): boolean {
for (const keyword of keywords) {
if (searchTarget.indexOf(keyword) === -1) {
return false;
Expand All @@ -58,7 +59,7 @@ function searchTargetContainsAllKeywords(searchTarget: string, keywords: string[
return true;
}

function searchTargetContainsAnyExcludedTerm(searchTarget: string, excludedTerms: string[]) : boolean {
function searchTargetContainsAnyExcludedTerm(searchTarget: string, excludedTerms: string[]): boolean {
for (const excludedTerm of excludedTerms) {
if (searchTarget.indexOf(excludedTerm) !== -1) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/app/_pipes/time-since/time-since.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class TimeSincePipe implements PipeTransform {
units = units.substring(0, units.length - 1);
}

return interval + ' ' + units;
return `${interval} ${units}`;
}

}
7 changes: 0 additions & 7 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,17 @@ import 'core-js/es6/set';
/** IE10 and IE11 requires the following to support `@angular/animation`. */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.


/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';



/** ALL Firefox browsers require the following to support `@angular/animation`. **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.



/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.



/***************************************************************************************************
* APPLICATION IMPORTS
*/
Expand Down

0 comments on commit 7c2da7c

Please sign in to comment.