Skip to content

Commit

Permalink
(chore) Bump Angular to v17
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Jul 30, 2024
1 parent 7ff7554 commit 76dcd8c
Show file tree
Hide file tree
Showing 22 changed files with 4,152 additions and 4,592 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,60 +14,60 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
node-version: '18'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Run lint
run: yarn turbo lint --color
run: yarn turbo run lint --color

- name: Run tests
run: yarn turbo test --color
run: yarn turbo run test --color

- name: Run build
run: yarn turbo build:lib --color --concurrency=5
run: yarn turbo run build:lib --color --concurrency=5

pre_release:
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name == 'push' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
node-version: '18'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Version
run: export NEW_VERSION="$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}" && yarn version --new-version $NEW_VERSION --no-git-tag-version && cd projects/ngx-file-uploader && yarn version --new-version $NEW_VERSION --no-git-tag-version

- name: Build
run: yarn turbo build:lib --color --concurrency=5
run: yarn turbo run build:lib --color --concurrency=5

- run: git config user.email "[email protected]" && git config user.name "OpenMRS CI"
- run: git add . && git commit -m "Prerelease version" --no-verify
Expand All @@ -78,7 +78,7 @@ jobs:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ngx-file-uploader
path: |
Expand All @@ -90,25 +90,25 @@ jobs:
if: ${{ github.event_name == 'release' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
node-version: '18'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Build
run: yarn turbo build:lib --color --concurrency=5
run: yarn turbo run build:lib --color --concurrency=5

- name: Publish release
run: yarn publish dist/ngx-file-uploader --tag latest --access public
6 changes: 3 additions & 3 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
TURBO_TEAM: ${{ github.repository_owner }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Setup a local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
uses: felixmosh/turborepo-gh-artifacts@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,20 @@ npm-debug.log
yarn-error.log
testem.log
/typings
.eslintcache

# logs
yarn-debug.log*
yarn-error.log*

# System Files
.DS_Store
Thumbs.db

.turbo

.nx/cache
.nx/workspace-data

# Yarn Integrity file
.yarn-integrity
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn turbo run test --color
Binary file added .yarn/install-state.gz
Binary file not shown.
16 changes: 11 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": ["jspdf"],
"allowedCommonJsDependencies": [
"core-js",
"dompurify",
"html2canvas",
"raf",
"rgbcolor"
],
"outputPath": "dist/ngx-file-uploader-demo",
"index": "src/index.html",
"main": "src/main.ts",
Expand Down Expand Up @@ -62,24 +68,24 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-file-uploader-demo:build"
"buildTarget": "ngx-file-uploader-demo:build"
},
"configurations": {
"production": {
"browserTarget": "ngx-file-uploader-demo:build:production"
"buildTarget": "ngx-file-uploader-demo:build:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html", "src/**/css"]
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ngx-file-uploader-demo:build"
"buildTarget": "ngx-file-uploader-demo:build"
}
},
"test": {
Expand Down
92 changes: 46 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,61 +14,61 @@
"prettier": "prettier --write \"**/**/*.{css,html,ts}\"",
"prepare": "husky install"
},
"private": false,
"dependencies": {
"@angular/animations": "^16.2.12",
"@angular/cdk": "^16.2.12",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/forms": "^16.2.12",
"@angular/material": "^16.2.12",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@angular/router": "^16.2.12",
"core-js": "^2.5.4",
"@angular/animations": "^17.3.12",
"@angular/cdk": "^17.3.10",
"@angular/common": "^17.3.12",
"@angular/compiler": "^17.3.12",
"@angular/core": "^17.3.12",
"@angular/forms": "^17.3.12",
"@angular/material": "^17.3.10",
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"core-js": "^2.6.12",
"jspdf": "^1.5.3",
"ngx-webcam": "^0.4.1",
"rxjs": "^7.8.1",
"tslib": "^2.0.0",
"zone.js": "~0.13.3"
"tslib": "^2.6.3",
"zone.js": "~0.14.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.11",
"@angular-eslint/builder": "^16.3.1",
"@angular-eslint/eslint-plugin": "^16.3.1",
"@angular-eslint/eslint-plugin-template": "^16.3.1",
"@angular-eslint/schematics": "^16.3.1",
"@angular-eslint/template-parser": "^16.3.1",
"@angular/cli": "^16.2.11",
"@angular/compiler-cli": "^16.2.12",
"@angular/language-service": "^16.2.12",
"@types/jasmine": "^3.6.0",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^18.7.14",
"@typescript-eslint/eslint-plugin": "5.27.1",
"@typescript-eslint/parser": "5.27.1",
"eslint": "^8.17.0",
"husky": ">=6",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^5.0.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.2",
"karma-firefox-launcher": "^1.1.0",
"karma-jasmine": "^4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"lint-staged": ">=10",
"ng-packagr": "~16.2.3",
"@angular-devkit/build-angular": "^17.3.8",
"@angular-eslint/builder": "17.5.2",
"@angular-eslint/eslint-plugin": "17.5.2",
"@angular-eslint/eslint-plugin-template": "17.5.2",
"@angular-eslint/schematics": "17.5.2",
"@angular-eslint/template-parser": "17.5.2",
"@angular/cli": "^17.3.8",
"@angular/compiler-cli": "^17.3.12",
"@angular/language-service": "^17.3.12",
"@types/jasmine": "^3.10.18",
"@types/jasminewd2": "^2.0.13",
"@types/node": "^18.19.42",
"@typescript-eslint/eslint-plugin": "7.11.0",
"@typescript-eslint/parser": "7.11.0",
"eslint": "^8.57.0",
"husky": "^9.1.4",
"jasmine-core": "^3.99.1",
"jasmine-spec-reporter": "^5.0.2",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-firefox-launcher": "^1.3.0",
"karma-jasmine": "^4.0.2",
"karma-jasmine-html-reporter": "^1.7.0",
"lint-staged": "^15.2.7",
"ng-packagr": "^17.3.0",
"prettier": "3.0.3",
"protractor": "^7.0.0",
"ts-node": "^5.0.1",
"tslint": "^6.1.0",
"turbo": "^1.10.15",
"typescript": "~4.9.5"
"tslint": "^6.1.3",
"turbo": "^2.0.9",
"typescript": "~5.4.5"
},
"lint-staged": {
"*.js": "eslint --cache --fix",
"*.{js,css,md}": "yarn prettier"
}
"*.ts": "eslint --cache --fix",
"*.{html,css,scss,md}": "prettier --write --list-different"
},
"packageManager": "[email protected]"
}
8 changes: 4 additions & 4 deletions projects/ngx-file-uploader/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ module.exports = function (config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
singleRun: false,
});
};
2 changes: 1 addition & 1 deletion projects/ngx-file-uploader/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"lib": {
"entryFile": "src/public_api.ts"
}
}
}
21 changes: 11 additions & 10 deletions projects/ngx-file-uploader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
"name": "@openmrs/ngx-file-uploader",
"version": "0.0.15",
"peerDependencies": {
"@angular/animations": "^16.2.12",
"@angular/cdk": "^16.2.12",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/forms": "^16.2.12",
"@angular/material": "^16.2.12",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@angular/router": "^16.2.12"
"@angular/animations": "^17.3.12",
"@angular/cdk": "^17.3.10",
"@angular/common": "^17.3.12",
"@angular/compiler": "^17.3.12",
"@angular/compiler-cli": "^17.3.12",
"@angular/core": "^17.3.12",
"@angular/forms": "^17.3.12",
"@angular/material": "^17.3.10",
"@angular/platform-browser": "17.3.12",
"@angular/platform-browser-dynamic": "17.3.12",
"@angular/router": "^17.3.12"
}
}
Loading

0 comments on commit 76dcd8c

Please sign in to comment.