Skip to content

Commit

Permalink
chore(build): Update dependencies to Angular 5 (#580)
Browse files Browse the repository at this point in the history
Closes #553
  • Loading branch information
brandonroberts authored and krjordan committed Nov 19, 2017
1 parent 4125914 commit 5a998ba
Show file tree
Hide file tree
Showing 12 changed files with 6,716 additions and 2,398 deletions.
7 changes: 3 additions & 4 deletions build/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export async function copyTypeDefinitionFiles(config: Config) {
* Creates minified copies of each UMD bundle
*/
export async function minifyUmdBundles(config: Config) {
const uglifyArgs = ['-c', '-m', '--screw-ie8', '--comments'];
const uglifyArgs = ['-c', '-m', '--comments'];

await mapAsync(util.getAllPackages(config), async pkg => {
const topLevelName = util.getTopLevelName(pkg);
Expand All @@ -183,11 +183,10 @@ export async function minifyUmdBundles(config: Config) {
const out = `./dist/${topLevelName}/bundles/${destinationName}.umd.min.js`;

return util.exec('uglifyjs', [
file,
...uglifyArgs,
`-o ${out}`,
`--source-map ${out}.map`,
`--source-map-include-sources ${file}`,
`--in-source-map ${file}.map`,
`--source-map "filename='${out}.map' includeSources='${file}', content='${file}.map'"`,
]);
});
}
Expand Down
5 changes: 2 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ machine:
environment:
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
node:
version: 6.9.5
version: 8.6.0

dependencies:
pre:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.28.1
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.1.0
cache_directories:
- ~/.cache/yarn
override:
- yarn
- yarn run bootstrap -- --concurrency=1

test:
override:
Expand Down
14 changes: 3 additions & 11 deletions example-app/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,15 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"es2017",
"dom"
],
],
"outDir": "../out-tsc/app",
"target": "es5",
"module": "es2015",
"types": [],
"baseUrl": ".",
"rootDir": "../",
"paths": {
"@ngrx/effects": ["../dist/effects"],
"@ngrx/effects/testing": ["../dist/effects/testing"],
"@ngrx/store": ["../dist/store"],
"@ngrx/router-store": ["../dist/router-store"],
"@ngrx/store-devtools": ["../dist/store-devtools"],
"@ngrx/entity": ["../dist/entity"]
}
"rootDir": "../"
},
"exclude": [
"../node_modules",
Expand Down
2 changes: 1 addition & 1 deletion example-app/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"es2017",
"dom"
],
"outDir": "../out-tsc/spec",
Expand Down
2 changes: 1 addition & 1 deletion modules/effects/src/effect_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class EffectSources extends Subject<any> {
}

/**
* @private
* @internal
*/
toActions(): Observable<Action> {
return mergeMap.call(
Expand Down
16 changes: 9 additions & 7 deletions modules/router-store/spec/integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,15 @@ function waitForNavigation(router: Router): Promise<any> {

function logOfRouterAndStore(router: Router, store: Store<any>): any[] {
const log: any[] = [];
router.events.subscribe(e =>
log.push({
type: 'router',
event: e.constructor.name,
url: (<any>e).url.toString(),
})
);
router.events.subscribe(e => {
if (e.hasOwnProperty('url')) {
log.push({
type: 'router',
event: e.constructor.name,
url: (<any>e).url.toString(),
});
}
});
store.subscribe(store => log.push({ type: 'store', state: store.reducer }));
return log;
}
4 changes: 2 additions & 2 deletions modules/router-store/src/router_store_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export function routerReducer<T = RouterStateSnapshot>(
}
}

export type StoreRouterConfig = {
export interface StoreRouterConfig {
stateKey?: string;
};
}

export const _ROUTER_CONFIG = new InjectionToken(
'@ngrx/router-store Internal Configuration'
Expand Down
4 changes: 3 additions & 1 deletion modules/store/src/store_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ export function _createFeatureReducers(
reducerCollection: ActionReducerMap<any, any>[],
tokenReducerCollection: ActionReducerMap<any, any>[]
) {
return reducerCollection.map((reducer, index) => {
const reducers = reducerCollection.map((reducer, index) => {
return reducer instanceof InjectionToken ? injector.get(reducer) : reducer;
});

return reducers;
}

export function _initialStateFactory(initialState: any): any {
Expand Down
Loading

0 comments on commit 5a998ba

Please sign in to comment.