Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into PR-2242
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefiozie committed Jan 9, 2020
2 parents 916565e + 711c30d commit 4845c6e
Show file tree
Hide file tree
Showing 171 changed files with 4,396 additions and 1,734 deletions.
2 changes: 1 addition & 1 deletion .circleci/bazel.rc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build --incompatible_depset_union=false
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
# Limit Bazel to consuming resources that fit in CircleCI "medium" class which is the default:
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
build --jobs 3 --local_resources=3072,2.0,1.0
build --jobs 2 --local_resources=3072,2.0,1.0

# Also limit Bazel's own JVM heap to stay within our 4G container limit
startup --host_jvm_args=-Xmx1g
Expand Down
29 changes: 18 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ 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" }}-0.11.0
var_1: &cache_key yarn-cache-{{ checksum "yarn.lock" }}-0.12.1
var_2: &run_in_node
docker:
- image: circleci/node:10.12
- image: circleci/node:12.9.1
var_3: &set_bazel_options
run:
command: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
var_4: &docs_cache_key yarn-docs-cache-{{ checksum "~/docs/projects/ngrx.io/yarn.lock" }}-0.1
var_5: &run_in_browser
docker:
- image: circleci/node:12.9.1-browsers
var_6: &docs_in_node
docker:
- image: circleci/node:10.12
var_7: &docs_in_browser
docker:
- image: circleci/node:10.12-browsers

Expand Down Expand Up @@ -52,12 +58,12 @@ jobs:

# Run the Buildifier to check our Bazel rules for format issues.
- run: 'yarn bazel:format --mode=check ||
(echo "BUILD files not formatted. Please run ''yarn bazel:format --mode=fix''" ; exit 1)'
(echo "BUILD files not formatted. Please run ''yarn bazel:format --mode=fix''" ; exit 1)'

# Run the Buildifier to check our Bazel rules for lint issues.
# Note: The `--lint=warn` will auto fixe (re-write) the affected files.
- run: 'yarn bazel:format --lint=warn ||
(echo "BUILD files contain unresolved lint errors. Please fix manually the remaining errors." ; exit 1)'
(echo "BUILD files contain unresolved lint errors. Please fix manually the remaining errors." ; exit 1)'

test:
<<: *run_in_node
Expand All @@ -70,7 +76,8 @@ jobs:

# Build and Test
- run: yarn bazel clean
- run: yarn test:bazel
- run: yarn test
- run: yarn build
# Store artifacts from build
- persist_to_workspace:
root: dist
Expand Down Expand Up @@ -112,7 +119,7 @@ jobs:
- run: yarn run example:cypress:ci

docs-tests:
<<: *run_in_browser
<<: *docs_in_browser
working_directory: ~/docs/projects/ngrx.io
steps:
- checkout:
Expand All @@ -122,7 +129,7 @@ jobs:
- run: yarn test --watch=false

docs:
<<: *run_in_node
<<: *docs_in_node
working_directory: ~/docs/projects/ngrx.io
steps:
- checkout:
Expand All @@ -144,7 +151,7 @@ jobs:
- ~/docs/projects/ngrx.io/node_modules

docs-preview:
<<: *run_in_node
<<: *docs_in_node
working_directory: ~/docs/projects/ngrx.io
steps:
- add_ssh_keys:
Expand All @@ -166,14 +173,14 @@ jobs:
- run: npm rebuild node-sass
- run: yarn build-for next --progress false --base-href /pr$CIRCLE_PULL_REQUEST_NUMBER-$SHORT_GIT_HASH/ --output-path dist/ngrx.io/pr$CIRCLE_PULL_REQUEST_NUMBER-$SHORT_GIT_HASH/ && yarn copy-404-page
- run: cp -rf src/extra-files/next/. dist/ngrx.io/pr$CIRCLE_PULL_REQUEST_NUMBER-$SHORT_GIT_HASH/
- run: yarn --cwd ../../ install && yarn --cwd ../../ run deploy:preview
- run: yarn --cwd ../../ install --ignore-engines && yarn --cwd ../../ run deploy:preview
- save_cache:
key: *docs_cache_key
paths:
- ~/docs/projects/ngrx.io/node_modules

deploy-docs-stable:
<<: *run_in_node
<<: *docs_in_node
working_directory: ~/docs/projects/ngrx.io
steps:
- checkout:
Expand Down Expand Up @@ -317,4 +324,4 @@ workflows:
tags:
only: /9\.\d+\.\d+(-\w+\.\d)/
branches:
ignore: /.*/
ignore: /.*/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ __build__/**
release
dist
bazel-out
bazel-bin
/node_modules/
lerna-debug.log
/lib/
Expand All @@ -73,4 +74,4 @@ example-dist/

*.tgz
modules/*/schematics-core/testing
!modules/schematics-core/testing
!modules/schematics-core/testing
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<a name="8.6.0"></a>

# [8.6.0](https://github.com/ngrx/platform/compare/8.5.2...8.6.0) (2019-12-18)

### Features

- **router-store:** add action creator for root router actions ([#2272](https://github.com/ngrx/platform/issues/2272)) ([f17589f](https://github.com/ngrx/platform/commit/f17589f)), closes [#2206](https://github.com/ngrx/platform/issues/2206)

<a name="8.5.2"></a>

## [8.5.2](https://github.com/ngrx/platform/compare/8.5.1...8.5.2) (2019-11-21)

### Bug Fixes

- **effects:** add EffectsRootModule and EffectsFeatureModule to public API ([#2273](https://github.com/ngrx/platform/issues/2273)) ([abe1f6b](https://github.com/ngrx/platform/commit/abe1f6b))
- **store:** added noop for addFeature in MockReducerManager ([#2265](https://github.com/ngrx/platform/issues/2265)) ([c42e444](https://github.com/ngrx/platform/commit/c42e444)), closes [#2263](https://github.com/ngrx/platform/issues/2263)
- **store-devtools:** escaping the safelist and blocklist strings ([#2259](https://github.com/ngrx/platform/issues/2259)) ([e888977](https://github.com/ngrx/platform/commit/e888977)), closes [#2228](https://github.com/ngrx/platform/issues/2228)

<a name="8.5.1"></a>

## [8.5.1](https://github.com/ngrx/platform/compare/8.5.0...8.5.1) (2019-11-12)
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ The scope should be the name of the npm package affected (as perceived by the pe

The following is the list of supported scopes:

- **component**
- **data**
- **effects**
- **entity**
Expand Down
33 changes: 24 additions & 9 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,41 @@ workspace(name = "ngrx")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Rules for NodeJS
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "abcf497e89cfc1d09132adfcd8c07526d026e162ae2cb681dcb896046417ce91",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.30.1/rules_nodejs-0.30.1.tar.gz"],
sha256 = "3d7296d834208792fa3b2ded8ec04e75068e3de172fae79db217615bd75a6ff7",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.39.1/rules_nodejs-0.39.1.tar.gz"],
)

# Rules for web testing
http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "1c0900547bdbe33d22aa258637dc560ce6042230e41e9ea9dad5d7d2fca8bc42",
urls = ["https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.0/rules_webtesting.tar.gz"],
sha256 = "f1f4d2c2f88d2beac64c82499a1e762b037966675dd892da89c87e39d72b33f6",
urls = [
"https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.2/rules_webtesting.tar.gz",
],
)

# Rules for compiling sass
http_archive(
name = "io_bazel_rules_sass",
sha256 = "d8b89e47b05092a6eed3fa199f2de7cf671a4b9165d0bf38f12a0363dda928d3",
strip_prefix = "rules_sass-1.14.1",
url = "https://github.com/bazelbuild/rules_sass/archive/1.14.1.zip",
sha256 = "ad08e8c82aa1f48b72dc295cb83bba33f514cdf24cc7b0e21e9353f20f0dc147",
strip_prefix = "rules_sass-5d1b26f8cd12c5d75dd359f9291090b341e8fd52",
# We need to use a version that includes SHA 5d1b26f8cd12c5d75dd359f9291090b341e8fd52 of
# the "rules_sass" repository as it adds support for workers.
url = "https://github.com/bazelbuild/rules_sass/archive/5d1b26f8cd12c5d75dd359f9291090b341e8fd52.zip",
)

####################################
# Load and install our dependencies downloaded above.

load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "yarn_install")

check_bazel_version(minimum_bazel_version = "0.26.0")
check_bazel_version(
message = "The minimum bazel version to use with this repo is 1.0.0",
minimum_bazel_version = "1.0.0",
)

yarn_install(
name = "npm",
Expand All @@ -43,23 +52,29 @@ yarn_install(
yarn_lock = "//:yarn.lock",
)

# Install all bazel dependencies of the @ngdeps npm packages
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")

install_bazel_dependencies()

load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories")
# Setup web testing
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")

web_test_repositories()

load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")

browser_repositories(
chromium = True,
firefox = True,
)

# Setup TypeScript Bazel workspace
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

# Setup the Sass rule repositories
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")

sass_repositories()
13 changes: 11 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "projects/example-app/dist",
"index": "projects/example-app/src/index.html",
"main": "projects/example-app/src/main.ts",
Expand All @@ -29,6 +30,12 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace":
Expand All @@ -42,7 +49,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
Expand Down Expand Up @@ -101,10 +107,13 @@
"flat": true,
"spec": false,
"prefix": "bc",
"styleext": "css"
"style": "css"
},
"@schematics/angular:directive": {
"prefix": "bc"
}
},
"cli": {
"analytics": false
}
}
5 changes: 4 additions & 1 deletion build/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export async function copySchematicsCore(config: Config) {
.toString('utf-8');
const pkgConfig = JSON.parse(packageJson);

if (pkgConfig.schematics || pkgConfig['ng-update'].migrations) {
if (
pkgConfig.schematics ||
(pkgConfig['ng-update'] && pkgConfig['ng-update'].migrations)
) {
ncp(
`${modulesDir}/schematics-core`,
`${modulesDir}/${pkg}/schematics-core`,
Expand Down
34 changes: 34 additions & 0 deletions modules/component/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "ng_module", "ng_package")

ng_module(
name = "component",
srcs = glob([
"*.ts",
"src/**/*.ts",
]),
module_name = "@ngrx/component",
deps = [
# TODO: @ngrx/component - add ngrx deps, also add it to package.json as peerDependency
# "//modules/store",
"@npm//@angular/common",
"@npm//@angular/core",
"@npm//rxjs",
],
)

ng_package(
name = "npm_package",
srcs = glob(["**/*.externs.js"]) + [
"package.json",
],
entry_point = "modules/component/index.js",
packages = [
# TODO: @ngrx/component - add schematic
# "//modules/component/schematics-core:npm_package",
],
deps = [
":component",
],
)
3 changes: 3 additions & 0 deletions modules/component/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Change Log

See [CHANGELOG.md](https://github.com/ngrx/platform/blob/master/CHANGELOG.md)
5 changes: 5 additions & 0 deletions modules/component/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @ngrx/component

The sources for this package are in the main [NgRx](https://github.com/ngrx/platform) repo. Please file issues and pull requests against that repo.

License: MIT
7 changes: 7 additions & 0 deletions modules/component/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* DO NOT EDIT
*
* This file is automatically generated at build
*/

export * from './public_api';
28 changes: 28 additions & 0 deletions modules/component/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@ngrx/component",
"version": "0.0.0-PLACEHOLDER",
"description": "Reactive utilities for components",
"repository": {
"type": "git",
"url": "https://github.com/ngrx/platform.git"
},
"keywords": [
"Angular",
"Redux",
"NgRx",
"Schematics",
"Angular CLI"
],
"author": "NgRx",
"license": "MIT",
"bugs": {
"url": "https://github.com/ngrx/platform/issues"
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/common": "NG_VERSION",
"@angular/core": "NG_VERSION",
"rxjs": "RXJS_VERSION"
},
"sideEffects": false
}
1 change: 1 addition & 0 deletions modules/component/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/index';
11 changes: 11 additions & 0 deletions modules/component/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
entry: './dist/component/@ngrx/component.es5.js',
dest: './dist/component/bundles/component.umd.js',
format: 'umd',
exports: 'named',
moduleName: 'ngrx.component',
globals: {
// TODO: @ngrx/component - add ngrx deps, also add it to tsconfig-build.json as path
// '@ngrx/store': 'ngrx.store',
},
};
Loading

0 comments on commit 4845c6e

Please sign in to comment.