Skip to content

Commit

Permalink
build: update to angular v15 (#131)
Browse files Browse the repository at this point in the history
* build: update to angular v14

- npx browserslist@latest --update-db
- npx ng update @angular/core@14 @angular/cli@14 @angular-eslint/schematics@14 @nguniversal/express-engine@14 @nguniversal/builders@14 --force

* build: update to angular v15

- npm i -D ajv@latest core-js@latest
- npx ng update @angular/core@15 @angular/cli@15 @angular-eslint/schematics@15 @nguniversal/express-engine@15 @nguniversal/builders@15 --force

* ci: disable Angular CLI Analytics

* build: bump minimal node v14.20.0

* ci: remove sudo usage

- sudo usage prevented ENVIRONMENT variables being passed to scripts
  • Loading branch information
chimurai authored Feb 2, 2023
1 parent 2aed05b commit f0471dc
Show file tree
Hide file tree
Showing 13 changed files with 11,041 additions and 9,874 deletions.
30 changes: 17 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
version: 2
version: 2.1

docker_defaults: &docker_defaults
docker:
- image: circleci/node:14.18.2-browsers
- image: cimg/node:14.20.0-browsers
environment:
NG_CLI_ANALYTICS: false

working_directory: ~/project/repo

attach_workspace: &attach_workspace
Expand Down Expand Up @@ -49,6 +52,8 @@ workflows:
# - end_to_end:
# requires:
# - build
orbs:
browser-tools: circleci/browser-tools@1.4.0
jobs:
build:
<<: *docker_defaults
Expand All @@ -57,36 +62,35 @@ jobs:
<<: *docker_defaults
steps:
- *attach_workspace
- browser-tools/install-chrome
- run:
name: Running unit tests
command: |
sudo npm run lint
sudo npm test
npm run lint
npm test
environment:
CHROME_BIN: /usr/bin/google-chrome
# To be added back in later
# sudo npm run coveralls
build_ssr:
<<: *docker_defaults
steps:
- *attach_workspace
- run:
environment:
NG_CLI_ANALYTICS: "false"
name: Building for Angular Universal
command: |
sudo NG_CLI_ANALYTICS="false" npm rebuild
sudo npm run build:ssr
npm rebuild
npm run build:ssr
bundle_size:
<<: *docker_defaults
steps:
- *attach_workspace
- run:
environment:
NG_CLI_ANALYTICS: "false"
name: Checking bundle size
command: |
sudo NG_CLI_ANALYTICS="false" npm rebuild
sudo npm run build:pkg
sudo npm run bundlesize
npm rebuild
npm run build:pkg
npm run bundlesize
# end_to_end:
# <<: *docker_defaults
# steps:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.18.2
v14.20.0
12 changes: 11 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,15 @@
}
}
},
"defaultProject": "ngx-skeleton-loader-demo"
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
},
"cli": {
"analytics": false
}
}
8 changes: 7 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: [process.env.CI ? 'ChromeHeadlessNoSandbox': 'Chrome'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
singleRun: false,
restartOnFileChange: true,
});
Expand Down
Loading

0 comments on commit f0471dc

Please sign in to comment.