Skip to content

Commit

Permalink
build: update to Angular 6.1.x/CLI 6.1.x/TypeScript 2.8.x dependencies
Browse files Browse the repository at this point in the history
Closes #1220
  • Loading branch information
brandonroberts committed Aug 3, 2018
1 parent 7463727 commit 76a70c8
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 150 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ version: 2
# See https://blog.daemonl.com/2016/02/yaml.html
# To validate changes, use an online parser, eg.
# https://yaml-online-parser.appspot.com/
var_1: &cache_key yarn-cache-{{ checksum "yarn.lock" }}
var_1: &cache_key yarn-cache-{{ checksum "yarn.lock" }}-0.3.3
var_2: &run_in_ngcontainer
docker:
- image: angular/ngcontainer:0.3.2
- image: angular/ngcontainer:0.3.3
var_3: &set_bazel_options
run:
command: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
Expand Down Expand Up @@ -52,6 +52,7 @@ jobs:
- run: bazel info release

# Install the dependencies from NPM, using the node and yarn binaries managed by Bazel
- run: yarn
- run: bazel run @yarn//:yarn

# Build and Test
Expand Down
14 changes: 14 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ filegroup(
"typescript",
"@types",
"tsickle",
"tslib",
"bytebuffer",
"hammerjs",
"minimist",
"protobufjs",
"protractor",
"reflect-metadata",
"source-map-support",
"tsutils",
"zone.js",
"long",
"@types",
"@angular-devkit/core",
"@angular-devkit/schematics",
] for ext in [
"*.js",
"*.json",
Expand Down
9 changes: 8 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi

check_bazel_version("0.14.0")

node_repositories(package_json = ["//:package.json"])
node_repositories(
package_json = ["//:package.json"],
preserve_symlinks = True,
)

####################################
# Fetch and install the TypeScript rules
Expand Down Expand Up @@ -106,6 +109,10 @@ local_repository(
path = "node_modules/rxjs/src",
)

load("@angular//:index.bzl", "ng_setup_workspace")

ng_setup_workspace()

####################################
# Bazel will fetch its own dependencies from npm.
# This makes it easier for ngrx users who use Bazel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,20 @@ exports[`Find Book Page should compile 1`] = `
>
<svg
focusable="false"
ng-reflect-ng-switch="true"
preserveAspectRatio="xMidYMid meet"
style="width: 30px; height: 30px;"
viewBox="0 0 23 23"
>
<circle
class="ng-star-inserted"
cx="50%"
cy="50%"
r="10"
style="stroke-dasharray: 62.83185307179586px; stroke-width: 10%;"
/>
</svg>
</mat-spinner>
</mat-card-content>
Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/src/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('CLI Schematic', () => {
});

it('should create a class by the angular/cli', () => {
const options = { ...defaultOptions, state: undefined };
const options = { ...defaultOptions };
const tree = schematicRunner.runSchematic('class', options, appTree);
const content = tree.readContent(`${projectPath}/src/app/foo.ts`);

Expand Down
24 changes: 12 additions & 12 deletions modules/store-devtools/src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
INIT,
} from '@ngrx/store';
import { difference, liftAction } from './utils';
import * as Actions from './actions';
import * as DevtoolsActions from './actions';
import { StoreDevtoolsConfig, StateSanitizer } from './config';
import { PerformAction } from './actions';

Expand All @@ -21,7 +21,7 @@ export type UpdateReducerAction = {
};

export type CoreActions = InitAction | UpdateReducerAction;
export type Actions = Actions.All | CoreActions;
export type Actions = DevtoolsActions.All | CoreActions;

export const INIT_ACTION = { type: INIT };

Expand Down Expand Up @@ -211,7 +211,7 @@ export function liftReducerWith(
let minInvalidatedStateIndex = 0;

switch (liftedAction.type) {
case Actions.RESET: {
case DevtoolsActions.RESET: {
// Get back to the state the store was created with.
actionsById = { 0: liftAction(INIT_ACTION) };
nextActionId = 1;
Expand All @@ -222,7 +222,7 @@ export function liftReducerWith(
computedStates = [];
break;
}
case Actions.COMMIT: {
case DevtoolsActions.COMMIT: {
// Consider the last committed state the new starting point.
// Squash any staged actions into a single committed state.
actionsById = { 0: liftAction(INIT_ACTION) };
Expand All @@ -234,7 +234,7 @@ export function liftReducerWith(
computedStates = [];
break;
}
case Actions.ROLLBACK: {
case DevtoolsActions.ROLLBACK: {
// Forget about any staged actions.
// Start again from the last committed state.
actionsById = { 0: liftAction(INIT_ACTION) };
Expand All @@ -245,7 +245,7 @@ export function liftReducerWith(
computedStates = [];
break;
}
case Actions.TOGGLE_ACTION: {
case DevtoolsActions.TOGGLE_ACTION: {
// Toggle whether an action with given ID is skipped.
// Being skipped means it is a no-op during the computation.
const { id: actionId } = liftedAction;
Expand All @@ -259,7 +259,7 @@ export function liftReducerWith(
minInvalidatedStateIndex = stagedActionIds.indexOf(actionId);
break;
}
case Actions.SET_ACTIONS_ACTIVE: {
case DevtoolsActions.SET_ACTIONS_ACTIVE: {
// Toggle whether an action with given ID is skipped.
// Being skipped means it is a no-op during the computation.
const { start, end, active } = liftedAction;
Expand All @@ -275,23 +275,23 @@ export function liftReducerWith(
minInvalidatedStateIndex = stagedActionIds.indexOf(start);
break;
}
case Actions.JUMP_TO_STATE: {
case DevtoolsActions.JUMP_TO_STATE: {
// Without recomputing anything, move the pointer that tell us
// which state is considered the current one. Useful for sliders.
currentStateIndex = liftedAction.index;
// Optimization: we know the history has not changed.
minInvalidatedStateIndex = Infinity;
break;
}
case Actions.JUMP_TO_ACTION: {
case DevtoolsActions.JUMP_TO_ACTION: {
// Jumps to a corresponding state to a specific action.
// Useful when filtering actions.
const index = stagedActionIds.indexOf(liftedAction.actionId);
if (index !== -1) currentStateIndex = index;
minInvalidatedStateIndex = Infinity;
break;
}
case Actions.SWEEP: {
case DevtoolsActions.SWEEP: {
// Forget any actions that are currently being skipped.
stagedActionIds = difference(stagedActionIds, skippedActionIds);
skippedActionIds = [];
Expand All @@ -301,7 +301,7 @@ export function liftReducerWith(
);
break;
}
case Actions.PERFORM_ACTION: {
case DevtoolsActions.PERFORM_ACTION: {
// Auto-commit as new actions come in.
if (options.maxAge && stagedActionIds.length === options.maxAge) {
commitExcessActions(1);
Expand All @@ -320,7 +320,7 @@ export function liftReducerWith(
minInvalidatedStateIndex = stagedActionIds.length - 1;
break;
}
case Actions.IMPORT_STATE: {
case DevtoolsActions.IMPORT_STATE: {
// Completely replace everything.
({
monitorState,
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@
]
},
"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/bazel": "^6.0.0",
"@angular/cdk": "^6.0.0",
"@angular/cli": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/compiler-cli": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/material": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/platform-server": "^6.0.0",
"@angular/router": "^6.0.0",
"@angular/animations": "^6.1.0",
"@angular/bazel": "^6.1.0",
"@angular/cdk": "^6.4.2",
"@angular/cli": "^6.1.2",
"@angular/common": "^6.1.0",
"@angular/compiler": "^6.1.0",
"@angular/compiler-cli": "^6.1.0",
"@angular/core": "^6.1.0",
"@angular/forms": "^6.1.0",
"@angular/http": "^6.1.0",
"@angular/material": "^6.4.2",
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/platform-server": "^6.1.0",
"@angular/router": "^6.1.0",
"@ngrx/db": "^2.2.0-beta.0",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"ngrx-store-freeze": "^0.2.2",
"opencollective": "^1.0.3",
"rxjs": "^6.1.0",
"rxjs-compat": "^6.1.0",
"rxjs": "^6.2.2",
"rxjs-compat": "^6.2.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
Expand Down Expand Up @@ -139,11 +139,11 @@
"sorcery": "^0.10.0",
"ts-node": "^5.0.1",
"tsconfig-paths": "^3.1.3",
"tsickle": "^0.27.2",
"tslib": "1.6.0",
"tsickle": "^0.32.1",
"tslib": "^1.7.1",
"tslint": "^5.0.0",
"tsutils": "2.20.0",
"typescript": "~2.7.2",
"typescript": "~2.8.4",
"uglify-js": "^3.1.9"
},
"collective": {
Expand Down Expand Up @@ -186,4 +186,4 @@
"dist"
]
}
}
}
Loading

0 comments on commit 76a70c8

Please sign in to comment.