Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Upgrade Angular, Node.js, and related dependencies #1243

Merged
merged 43 commits into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e054090
Update all packages to latest
flibbertigibbet Jun 14, 2019
5d2b0c7
Upgrade to node 11
flibbertigibbet Jun 14, 2019
1647004
Prepare for upgrade
flibbertigibbet Jun 14, 2019
110faa4
ng update @angular/cli
flibbertigibbet Jun 14, 2019
b12e6ca
Disable strictPropertyInitialization
flibbertigibbet Jun 14, 2019
bf907d2
arxjs-5-to-6-migrate -p tsconfig.json
flibbertigibbet Jun 14, 2019
3285531
Fix typescript version to <3.5
flibbertigibbet Jun 14, 2019
21fb2ca
Update references to @angular/common/http
flibbertigibbet Jun 14, 2019
1bd61e4
Update Observable map references
flibbertigibbet Jun 14, 2019
0b07f7e
Add geojson types
flibbertigibbet Jun 14, 2019
38d673b
Explicitly make all ViewChildren static
flibbertigibbet Jun 14, 2019
5ae5e15
Remove deprecated linter configurations
flibbertigibbet Jun 14, 2019
7405fa5
Upgrade Angular Http client usage
flibbertigibbet Jun 14, 2019
5d5b761
Fix assorted Observable errors from rxjs upgrade
flibbertigibbet Jun 14, 2019
e3b9f6c
Fix corejs version
flibbertigibbet Jun 14, 2019
48e185a
Fix ngx-bootstrap modal import
flibbertigibbet Jun 14, 2019
5d73a96
Fix serve command
flibbertigibbet Jun 15, 2019
95a9621
Add library reference
flibbertigibbet Jun 15, 2019
4e6ba1d
Fix HttpClientModule import
flibbertigibbet Jun 15, 2019
98c96a1
Fix build:prod command
flibbertigibbet Jun 25, 2019
95a43f0
Package updates
flibbertigibbet Jun 25, 2019
e11ca74
Install local packages in docker
flibbertigibbet Jun 25, 2019
bc5ba57
Revert to current node LTS release
CloudNiner Jul 2, 2019
c135ed2
Migrate climate-change-components to temperate project
CloudNiner Jul 2, 2019
3eb24a3
Implement HTTP AuthInterceptor
CloudNiner Jul 2, 2019
8e48bee
Update to use typeaheadIsFirstItemActive property
CloudNiner Jul 2, 2019
00f205f
Fix live reloading
maurizi Jul 11, 2019
4b50ed1
Fix displaying error messages returned by API
maurizi Jul 11, 2019
c36b220
Remove broken/unused linting rule
maurizi Jul 11, 2019
fbb1df8
Fix unauthenticated API use (new user registration, forgot password, …
maurizi Jul 11, 2019
ca788a5
Fix CSV download service
maurizi Jul 11, 2019
bae6a18
Fix styling reliant on whitespace for padding of inline elements
maurizi Jul 11, 2019
9761f2d
Fix loading data for indicator charts
maurizi Jul 11, 2019
df46477
Run `ng lint --fix`
maurizi Jul 11, 2019
02b7049
Fix typeahead usage
maurizi Jul 11, 2019
1daba88
Fix remaining lint
maurizi Jul 12, 2019
e05b7fd
Add vendored version of difflib.js
maurizi Jul 12, 2019
79035b4
Fix unit tests
maurizi Jul 12, 2019
95dda61
Update CHANGELOG
maurizi Jul 12, 2019
eadf041
Fix shellcheck violation
maurizi Jul 16, 2019
455256c
Fix running Angular tests from scripts/test
maurizi Jul 16, 2019
7e5916b
Rename callbacks to match correct naming scheme
maurizi Jul 16, 2019
3089863
Whitespace cleanup
maurizi Jul 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<!--When making a new release, remember to update the magic links at the bottom.-->
## [Unreleased]
- Updated Node.js to version 10
- Updated Angular to version 8
- The `climate-change-components` library is now a part of this project as the `climate-api` module instead of being installed as an NPM dependency

## [1.9.0] - 2019-05-14
### Added
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ It is easier to download the data using the above script. If you want to update
- Save each sheet in CSV format
- Update the CSVs on S3, located in the `s3://azavea-climate-sandbox` folder as `missy_cities.csv` and `missy_strategies_with_weather_events.csv`.

#### Modifying and publishing the climate-change-components repository

See [the wiki](https://github.com/azavea/temperate/wiki/Making-changes-to-the-Climate-Change-Components-library)

### Using Docker in the VM

The other project scripts are meant to execute in the VM in the `/vagrant` directory.
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
GIT_COMMIT="${GIT_COMMIT}" docker-compose \
-f docker-compose.yml \
-f docker-compose.test.yml \
run --rm angular run test --sourcemaps=false
run --rm angular run test

echo "Check for missing migrations"
GIT_COMMIT="${GIT_COMMIT}" docker-compose \
Expand Down
2 changes: 0 additions & 2 deletions scripts/update
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ if [[ -n "${PLANIT_DEBUG}" ]]; then
set -x
fi

DIR="$(dirname "$0")/../"

function usage() {
echo -n \
"Usage: $(basename "$0")
Expand Down
8 changes: 1 addition & 7 deletions src/angular/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:6-slim
FROM node:10-slim

# Install Chrome for running ng test
RUN set -ex \
Expand All @@ -18,12 +18,6 @@ COPY ./planit/yarn.lock /opt/planit/angular/planit/
RUN yarn install --pure-lockfile \
&& yarn cache clean --force

# Install fork of ngx-bootstrap with typeahead improvements
# Code is at https://github.com/azavea/ngx-bootstrap/commit/77803c8
# Built using 'npm run build && cd dist && npm pack'
COPY ./ngx-bootstrap-2.0.3.tgz /opt/planit/angular/planit/
RUN npm install ngx-bootstrap-2.0.3.tgz

COPY ./planit/ /opt/planit/angular/planit

ENTRYPOINT ["yarn"]
Expand Down
Binary file removed src/angular/ngx-bootstrap-2.0.3.tgz
Binary file not shown.
74 changes: 0 additions & 74 deletions src/angular/planit/.angular-cli.json

This file was deleted.

140 changes: 140 additions & 0 deletions src/angular/planit/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"planit": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico"
],
"styles": [
"src/assets/sass/main.scss",
"src/vendor/loading-bar/loading-bar.css"
],
"scripts": [
"src/vendor/loading-bar/loading-bar.min.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "planit:build",
"port": 4210,
"host": "0.0.0.0"
},
"configurations": {
"production": {
"browserTarget": "planit:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "planit:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"src/vendor/loading-bar/loading-bar.min.js"
],
"styles": [
"src/assets/sass/main.scss",
"src/vendor/loading-bar/loading-bar.css"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**/*"
]
}
}
}
},
"planit-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "planit:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**/*"
]
}
}
}
}
},
"defaultProject": "planit",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
12 changes: 12 additions & 0 deletions src/angular/planit/browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
10 changes: 4 additions & 6 deletions src/angular/planit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},

reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
Expand Down
Loading