Skip to content

Commit

Permalink
chore: update to Angular v5.2 and update peer dep requirements
Browse files Browse the repository at this point in the history
* Update to Angular v5.2 and TypeScript v2.6
* Update build config to conform with angular/components#9355
  • Loading branch information
CaerusKaru committed Jan 12, 2018
1 parent b9745c6 commit b884ab9
Show file tree
Hide file tree
Showing 8 changed files with 9,353 additions and 9,259 deletions.
2 changes: 1 addition & 1 deletion build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const package = require('./package.json');
const buildVersion = package.version;

/** Required Angular version for the project. */
const angularVersion = package.dependencies['@angular/core'];
const angularVersion = '^5.0.0';

/** License that will be placed inside of all created bundles. */
const buildLicense = `/**
Expand Down
18,486 changes: 9,297 additions & 9,189 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"node": ">= 5.4.1"
},
"dependencies": {
"@angular/core": "~5.1.0",
"@angular/common": "~5.1.0",
"@angular/compiler": "~5.1.0",
"@angular/platform-browser": "~5.1.0",
"@angular/core": "~5.2.0",
"@angular/common": "~5.2.0",
"@angular/compiler": "~5.2.0",
"@angular/platform-browser": "~5.2.0",
"core-js": "^2.4.1",
"rxjs": "^5.5.5",
"systemjs": "0.19.43",
Expand All @@ -38,15 +38,15 @@
"zone.js": "^0.8.18"
},
"devDependencies": {
"@angular/animations": "~5.1.0",
"@angular/animations": "~5.2.0",
"@angular/cdk": "^5.0.1",
"@angular/compiler-cli": "~5.1.0",
"@angular/forms": "~5.1.0",
"@angular/http": "~5.1.0",
"@angular/compiler-cli": "~5.2.0",
"@angular/forms": "~5.2.0",
"@angular/http": "~5.2.0",
"@angular/material": "^5.0.1",
"@angular/platform-browser-dynamic": "~5.1.0",
"@angular/platform-server": "~5.1.0",
"@angular/router": "~5.1.0",
"@angular/platform-browser-dynamic": "~5.2.0",
"@angular/platform-server": "~5.2.0",
"@angular/router": "~5.2.0",
"@angular/tsc-wrapped": "^4.4.6",
"@google-cloud/storage": "^1.4.0",
"@types/chalk": "^0.4.31",
Expand Down Expand Up @@ -122,7 +122,7 @@
"tsconfig-paths": "^2.3.0",
"tslint": "^5.8.0",
"tsutils": "^2.13.0",
"typescript": "^2.4.2",
"typescript": "^2.6.2",
"uglify-js": "^2.8.14"
}
}
}
6 changes: 2 additions & 4 deletions src/lib/api/core/responsive-activation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {MediaQuerySubscriber, MediaChange} from '../../media-query/media-change'
describe('responsive-activation', () => {
let monitor: MediaMonitor;
let matchMedia: MockMatchMedia;
let breakPoints: BreakPointRegistry;

/**
* MediaQuery Change responder used to determine the activated input
Expand Down Expand Up @@ -52,9 +51,8 @@ describe('responsive-activation', () => {

// Single async inject to save references; which are used in all tests below
beforeEach(inject(
[BreakPointRegistry, MatchMedia, MediaMonitor],
(_breakPoints, _matchMedia, _mediaMonitor) => {
breakPoints = _breakPoints; // Only used to look up mediaQuery by aliases
[MatchMedia, MediaMonitor],
(_matchMedia, _mediaMonitor) => {
matchMedia = _matchMedia; // Only used to manual/simulate activate a mediaQuery
monitor = _mediaMonitor;
}
Expand Down
4 changes: 1 addition & 3 deletions src/lib/api/ext/img-src.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ const DEFAULT_SRC = 'https://dummyimage.com/300x300/c72538/ffffff.png';
describe('img-src directive', () => {
let fixture: ComponentFixture<any>;
let matchMedia: MockMatchMedia;
let breakpoints: BreakPointRegistry;

let componentWithTemplate = (template: string) => {
fixture = makeCreateTestComponent(() => TestSrcComponent)(template);

inject([MatchMedia, BreakPointRegistry],
(_matchMedia: MockMatchMedia, _breakpoints: BreakPointRegistry) => {
(_matchMedia: MockMatchMedia) => {
matchMedia = _matchMedia;
breakpoints = _breakpoints;
})();
};

Expand Down
7 changes: 1 addition & 6 deletions src/lib/api/flexbox/flex-offset.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import {Component} from '@angular/core';
import {CommonModule} from '@angular/common';
import {ComponentFixture, TestBed, inject} from '@angular/core/testing';
import {ComponentFixture, TestBed} from '@angular/core/testing';

import {DEFAULT_BREAKPOINTS_PROVIDER} from '../../media-query/breakpoints/break-points-provider';
import {BreakPointRegistry} from '../../media-query/breakpoints/break-point-registry';
Expand All @@ -26,14 +26,9 @@ import {

describe('flex directive', () => {
let fixture: ComponentFixture<any>;
let matchMedia: MockMatchMedia;
let expectDOMFrom = makeExpectDOMFrom(() => TestFlexComponent);
let componentWithTemplate = (template: string) => {
fixture = makeCreateTestComponent(() => TestFlexComponent)(template);

inject([MatchMedia], (_matchMedia: MockMatchMedia) => {
matchMedia = _matchMedia;
})();
};

beforeEach(() => {
Expand Down
71 changes: 38 additions & 33 deletions tools/gulp/tasks/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ export const releasePackages = [
/** Parse command-line arguments for release task. */
const argv = minimist(process.argv.slice(3));

task('publish', sequenceTask(
':publish:whoami',
':publish:build-releases',
'validate-release:check-bundles',
':publish',
':publish:logout',
));

/** Task that builds all releases that will be published. */
task(':publish:build-releases', sequenceTask(
'clean',
Expand All @@ -29,6 +37,36 @@ task(':publish:whoami', execTask('npm', ['whoami'], {

task(':publish:logout', execTask('npm', ['logout']));

task(':publish', async () => {
const label = argv['tag'];
const version = buildConfig.projectVersion;
const currentDir = process.cwd();

console.log('');
if (!label) {
console.log(yellow('You can use a label with --tag=labelName.'));
console.log(yellow(`Publishing version ${version} using the latest tag.`));
} else {
console.log(yellow(`Publishing ${version} using the ${label} tag.`));
}
console.log('');

if (releasePackages.length > 1) {
console.warn(red('Warning: Multiple packages will be released if proceeding.'));
console.warn(red('Warning: Packages to be released: ', releasePackages.join(', ')));
}

console.log(yellow('> Make sure to check the "angularVersion" in the build config.'));
console.log(yellow('> The version in the config defines the peer dependency of Angular.'));
console.log();

// Iterate over every declared release package and publish it on NPM.
for (const packageName of releasePackages) {
await _execNpmPublish(label, packageName);
}

process.chdir(currentDir);
});

function _execNpmPublish(label: string, packageName: string): Promise<{}> | undefined {
const packageDir = join(buildConfig.outputDir, 'releases', packageName);
Expand Down Expand Up @@ -79,36 +117,3 @@ function _execNpmPublish(label: string, packageName: string): Promise<{}> | unde
});
});
}

task(':publish', async () => {
const label = argv['tag'];
const currentDir = process.cwd();

console.log('');
if (!label) {
console.log(yellow('You can use a label with --tag=labelName.'));
console.log(yellow('Publishing using the latest tag.'));
} else {
console.log(yellow(`Publishing using the ${label} tag.`));
}
console.log('');

if (releasePackages.length > 1) {
console.warn(red('Warning: Multiple packages will be released if proceeding.'));
}

// Iterate over every declared release package and publish it on NPM.
for (const packageName of releasePackages) {
await _execNpmPublish(label, packageName);
}

process.chdir(currentDir);
});

task('publish', sequenceTask(
':publish:whoami',
':publish:build-releases',
'validate-release:check-bundles',
':publish',
':publish:logout',
));
10 changes: 0 additions & 10 deletions tools/package-tools/build-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ export class BuildPackage {
/** Path to the entry file of the package in the output directory. */
readonly entryFilePath: string;

/** Path to the tsconfig file, which will be used to build the package. */
private readonly tsconfigBuild: string;

/** Path to the tsconfig file, which will be used to build the tests. */
private readonly tsconfigTests: string;

/** Package bundler instance. */
private bundler = new PackageBundler(this);

Expand All @@ -62,10 +56,6 @@ export class BuildPackage {
this.sourceDir = join(packagesDir, name);
this.outputDir = join(outputDir, 'packages', name);
this.esm5OutputDir = join(outputDir, 'packages', name, 'esm5');

this.tsconfigBuild = join(this.sourceDir, buildTsconfigName);
this.tsconfigTests = join(this.sourceDir, testsTsconfigName);

this.entryFilePath = join(this.outputDir, 'index.js');
}

Expand Down

0 comments on commit b884ab9

Please sign in to comment.