Skip to content

Commit

Permalink
Merge pull request #674 from rsdmike/angularUpdate
Browse files Browse the repository at this point in the history
build(deps): update angular to v16
  • Loading branch information
ernestojeda authored Dec 22, 2023
2 parents bef2eed + 34e330d commit edf53e5
Show file tree
Hide file tree
Showing 20 changed files with 7,920 additions and 10,390 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ cmd/edgex-ui-server/edgex-ui-server
.gitmessage
coverage.out
/web/VERSION
**/.angular/cache
110 changes: 110 additions & 0 deletions angularmigrationlogs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
UPDATE package.json (1552 bytes)
✔ Packages successfully installed.
** Executing migrations of package '@angular/cli' **

> Remove polyfills required only for Internet Explorer which is no longer supported.
UPDATE src/polyfills.ts (2636 bytes)
Migration completed (1 file modified).

> Remove no longer valid Angular schematic options from `angular.json`.
Migration completed (No changes made).

> Remove deprecated options from 'angular.json' that are no longer present in v13.
UPDATE angular.json (8825 bytes)
Migration completed (1 file modified).

> Updating '.gitignore' to include '.angular/cache'.
Could not find '.gitignore'.
Migration completed (No changes made).

> Update library projects to be published in partial mode and removed deprecated options from ng-packagr configuration.
Migration completed (No changes made).

** Executing migrations of package '@angular/core' **

> Migrates `[routerLink]=""` in templates to `[routerLink]="[]"` because these links are likely intended to route to the current page with updated fragment/query params.
Migration completed (No changes made).

> In Angular version 13, the `teardown` flag in `TestBed` will be enabled by default.
This migration automatically opts out existing apps from the new teardown behavior.
UPDATE src/test.ts (827 bytes)
Migration completed (1 file modified).

> As of Angular version 13, `entryComponents` are no longer necessary.
Migration completed (No changes made).



UPDATE package.json (1552 bytes)
✔ Packages successfully installed.
** Executing migrations of package '@angular/core' **

> As of Angular version 13, `entryComponents` are no longer necessary.
Migration completed.

> In Angular version 14, the `pathMatch` property of `Routes` was updated to be a strict union of the two valid options: `'full'|'prefix'`.
`Routes` and `Route` variables need an explicit type so TypeScript does not infer the property as the looser `string`.
Migration completed.

> As of Angular version 14, Forms model classes accept a type parameter, and existing usages must be opted out to preserve backwards-compatibility.
UPDATE src/app/command/command-service-template/command-service-template.component.ts (7406 bytes)
UPDATE src/app/rule-engine/rules/sinks/sink-base-properties/sink-base-properties.component.ts (3678 bytes)
Migration completed.

** Executing migrations of package '@angular/cli' **

> Remove 'defaultProject' option from workspace configuration.
The project to use will be determined from the current working directory.
UPDATE angular.json (8797 bytes)
Migration completed.

> Remove 'showCircularDependencies' option from browser and server builders.
Migration completed.

> Replace 'defaultCollection' option in workspace configuration with 'schematicCollections'.
Migration completed.

> Update Angular packages 'dependencies' and 'devDependencies' version prefix to '^' instead of '~'.
UPDATE package.json (1552 bytes)
✔ Packages installed successfully.
Migration completed.

> Remove 'package.json' files from library projects secondary entrypoints.
Migration completed.

> Update TypeScript compilation target to 'ES2020'.
UPDATE tsconfig.json (764 bytes)
Migration completed.



UPDATE package.json (1562 bytes)
✔ Packages successfully installed.
** Executing migrations of package '@angular/cli' **

> Remove 'defaultProject' option from workspace configuration.
The project to use will be determined from the current working directory.
Migration completed (No changes made).

> Replace removed 'defaultCollection' option in workspace configuration with 'schematicCollections'.
Migration completed (No changes made).

> Update the '@angular-devkit/build-angular:server' builder configuration to disable 'buildOptimizer' for non optimized builds.
Migration completed (No changes made).

** Executing migrations of package '@angular/core' **

> In Angular version 15.2, the guard and resolver interfaces (CanActivate, Resolve, etc) were deprecated.
This migration removes imports and 'implements' clauses that contain them.
UPDATE src/app/guards/auth/guard/auth.guard.ts (2066 bytes)
UPDATE src/app/guards/health/metadata-alive.guard.ts (2267 bytes)
UPDATE src/app/guards/health/coredata-alive.guard.ts (2251 bytes)
UPDATE src/app/guards/health/notification-alive.guard.ts (2285 bytes)
UPDATE src/app/guards/health/scheduler-alive.guard.ts (2277 bytes)
UPDATE src/app/guards/health/rule-engine-alive.guard.ts (2274 bytes)
UPDATE src/app/guards/health/registry-center-alive.guard.ts (2288 bytes)
UPDATE src/app/guards/health/system-agent-alive.guard.ts (2281 bytes)
Migration completed (8 files modified).

> As of Angular v16, the `moduleId` property of `@Component` is deprecated as it no longer has any effect.
Migration completed (No changes made).
17 changes: 0 additions & 17 deletions web/.browserslistrc

This file was deleted.

46 changes: 23 additions & 23 deletions web/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#
# Copyright (c) 2022 Intel Corporation
# Copyright (c) 2022 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0

# See README.md for details about this Makefile.


########################################
# Make Configuration
# Make Configuration
########################################
MAKEFLAGS += --warn-undefined-variables --no-builtin-rules
TRACE ?= 0
Expand All @@ -22,14 +22,14 @@ endif
clean clean-image clean-node clean-all

########################################
# Default target and common aliases.
# Default target and common aliases.
########################################
default docker: image
serve: serve-development
SERVER_TARGETS=development production zh

########################################
# Development server configuration.
# Development server configuration.
########################################
PUBLIC_PORT = 4200
PUBLIC_HOST = 127.0.0.1
Expand All @@ -42,7 +42,7 @@ ANGULAR_TARGETS = test e2e lint extract-i18n
NPM_TARGETS = audit
build_args ?=
run_args ?=
tool_args ?=
tool_args ?=

test: karma.conf.js
test: cmd_args += --code-coverage --watch false --browsers ChromeHeadlessNoSandbox
Expand All @@ -51,7 +51,7 @@ extract-i18n: cmd_args += --output-path=locale


########################################
# Docker image targets
# Docker image targets
########################################
# Configuration for the Docker image.
# This probably doesn't need to strictly align with all EdgeX conventions,
Expand All @@ -72,7 +72,7 @@ user:

# Build a Docker image used by other targets/for development.
#
# The (phony) image target depends on a sentinel file to track whether the image is built.
# The (phony) image target depends on a sentinel file to track whether the image is built.
# That sentinel has an order-only dependency on a target that removes the sentinel file
# if it turns out the Docker image has been removed, ensuring it'll be rebuilt if needed.
# Note that this image intentionally does not depend upon the actual source files.
Expand All @@ -93,23 +93,23 @@ $(IMAGE_SENTINEL): Dockerfile $(VERSION_FILE) | $(SERVICE_NAME).image-check
$(SERVICE_NAME).image-check:
$(call run_image_check,$(IMAGE_SENTINEL),$(IMAGE_NAME))

# Enforce that a version file exists so we don't rebuild the image unnecessarily.
# This should be removed if the `$(VERSION)-dev` tag is removed from the image.
# Enforce that a version file exists so we don't rebuild the image unnecessarily.
# This should be removed if the `$(VERSION)-dev` tag is removed from the image.
$(VERSION_FILE):
@echo -e "$(yellow)warning: generating $(VERSION_FILE)$(clear)"
echo "0.0.0" > $@



########################################
# Build/test/development targets
# Build/test/development targets
########################################
# Source files are everything under ./src + all *.json in the current directory.
SRC_FILES = $(shell find . -path './src/*' -type f -print \
-o -path './*/*' -prune \
-o -name '*.json' -print)
-o -name '*.json' -print)

# Start a dev server in a container.
# Start a dev server in a container.
#
# This runs Angular's local development server with hot reloading enabled,
# so you edit the files locally and see the changes right away.
Expand All @@ -135,27 +135,27 @@ dist/web/: $(SRC_FILES) node_modules | image
# Install dependencies.
install node_modules: package.json package-lock.json | image
mkdir -p node_modules coverage
chown "$(USER_ID):$(GROUP_ID)" node_modules coverage package-lock.json
chown "$(USER_ID):$(GROUP_ID)" . node_modules coverage package-lock.json
$(RUN) npm install

# Run Angular CLI or npm commands in a container.
.PHONY: $(ANGULAR_TARGETS) $(NPM_TARGETS)
$(ANGULAR_TARGETS): node_modules | image
$(RUN) ng $@ $(cmd_args)
$(NPM_TARGETS): node_modules | image
$(RUN) npm $@ $(cmd_args)
$(RUN) npm $@ $(cmd_args)


########################################
# Cleanup
# Cleanup
########################################
# Remove production build output.
clean:
rm -rf dist coverage

# Remove dependencies.
clean-node:
rm -rf node_modules
rm -rf node_modules

# Remove Docker images.
clean-image:
Expand All @@ -166,7 +166,7 @@ clean-all: clean clean-node clean-image


########################################
# Makefile Helpers
# Makefile Helpers
########################################
# Colors.
red = $(shell tput setaf 1)
Expand All @@ -175,15 +175,15 @@ yellow = $(shell tput setaf 3)
cyan = $(shell tput setaf 6)
clear = $(shell tput sgr0)

# Usage: $(RUN) CMD [ARGS...]
# Usage: $(RUN) CMD [ARGS...]
#
# Run a command in a temporary container using the image built by `make image`.
# This bind-mounts the local directory to /app and uses the current user's uid & gid,
# so this is used in targets like build, test, serve, etc. to facilitate local development
# so this is used in targets like build, test, serve, etc. to facilitate local development
# while running the actual server within an isolated container environment.
#
# You can pass additional docker run arguments by setting run_args.
#
#
# The tty check is so we don't attempt to attach a tty when one doesn't exist.
# Although "-s" _should_ prevent output when there's no TTY,
# at least on Jenkins we get the ever helpful "ignoring all arguments",
Expand All @@ -199,8 +199,8 @@ RUN = docker run --rm -i \
#
# Check if some image named IMAGE exists (with any tag suffix),
# or delete and remake the SENTINEL target if it does not.
define run_image_check =
$(if $(and
define run_image_check =
$(if $(and
$(wildcard $1),\
$(if $(shell docker images -q $2),,missing)),\
@echo -e "$(red)image $2 does not exist -- will recreate$(clear)"
Expand Down
14 changes: 0 additions & 14 deletions web/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,6 @@
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand All @@ -228,7 +215,6 @@
}
}
},
"defaultProject": "web",
"cli": {
"analytics": "3f1e1dce-5f70-4581-a0a8-09ad75dd29e1"
}
Expand Down
Loading

0 comments on commit edf53e5

Please sign in to comment.