Skip to content

Commit

Permalink
chore: bump angular from 12.x to 13 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Dec 28, 2021
1 parent 6cff8ee commit 9d1b5a9
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 53 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ jobs:
- name: checkout
uses: actions/checkout@master

- name: install
run: npm install
- uses: borales/[email protected]
with:
cmd: install

- name: run
run: |
npm run build
yarn run build
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: install
run: npm install
- uses: borales/[email protected]
with:
cmd: install

- name: run
run: |
npm run test
yarn run test
cat ./coverage/lcov.info | ./node_modules/.bin/codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -38,21 +40,23 @@ jobs:
- name: checkout
uses: actions/checkout@master

- name: install
run: npm install
- uses: borales/[email protected]
with:
cmd: install

- name: run
run: |
npm run lint
yarn run lint
site:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: install
run: npm install
- uses: borales/[email protected]
with:
cmd: install

- name: build
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/out-tsc
/publish
/yarn.lock
/.angular/cache

# dependencies
/node_modules
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16.1
14.16.1
7 changes: 1 addition & 6 deletions lib/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
"dest": "../publish",
"deleteDestPath": true,
"lib": {
"amdId": "ngxFileSaver",
"umdId": "ngxFileSaver",
"entryFile": "index.ts",
"umdModuleIds": {
"file-saver": "saveAs"
}
"entryFile": "index.ts"
}
}
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-filesaver",
"version": "12.0.0",
"version": "13.0.0",
"description": "Simple file save with FileSaver.js",
"keywords": [
"angular",
Expand Down
8 changes: 6 additions & 2 deletions lib/spec/filesaver.directive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ describe('ngx-filesaveer:', () => {
fixture.detectChanges();
let fn = '';
const filename = 'newfile.docx';
spyOn(fs, 'saveAs').and.callFake((_: any, fileName?: string) => (fn = fileName!));
spyOn(fs, 'saveAs').and.callFake(((_: Blob | string, filename?: string, __?: boolean) => {
fn = filename!;
}) as any);
context.fileName = null;
fixture.detectChanges();
(dl.query(By.css('#down-docx')).nativeElement as HTMLButtonElement).click();
Expand All @@ -72,7 +74,9 @@ describe('ngx-filesaveer:', () => {
fixture.detectChanges();
let fn = '';
const filename = 'x-newfile.docx';
spyOn(fs, 'saveAs').and.callFake((_: any, fileName?: string) => (fn = fileName!));
spyOn(fs, 'saveAs').and.callFake(((_: Blob | string, filename?: string, __?: boolean) => {
fn = filename!;
}) as any);
context.fileName = null;
fixture.detectChanges();
(dl.query(By.css('#down-docx')).nativeElement as HTMLButtonElement).click();
Expand Down
62 changes: 31 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-filesaver",
"version": "12.0.0",
"version": "13.0.0",
"description": "Simple file save with FileSaver.js",
"repository": {
"type": "git",
Expand Down Expand Up @@ -29,42 +29,42 @@
"release": "npm run build && cd publish && npm publish --access public"
},
"dependencies": {
"@angular/animations": "~12.0.2",
"@angular/common": "~12.0.2",
"@angular/compiler": "~12.0.2",
"@angular/core": "~12.0.2",
"@angular/forms": "~12.0.2",
"@angular/platform-browser": "~12.0.2",
"@angular/platform-browser-dynamic": "~12.0.2",
"@angular/router": "~12.0.2",
"rxjs": "~6.6.0",
"tslib": "^2.1.0",
"@angular/animations": "~13.1.1",
"@angular/common": "~13.1.1",
"@angular/compiler": "~13.1.1",
"@angular/core": "~13.1.1",
"@angular/forms": "~13.1.1",
"@angular/platform-browser": "~13.1.1",
"@angular/platform-browser-dynamic": "~13.1.1",
"@angular/router": "~13.1.1",
"rxjs": "~7.4.0",
"tslib": "^2.3.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.0.2",
"@angular/cli": "~12.0.2",
"@angular/compiler-cli": "~12.0.2",
"@types/jasmine": "~3.6.0",
"@angular-devkit/build-angular": "~13.1.2",
"@angular/cli": "~13.1.2",
"@angular/compiler-cli": "~13.1.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.7.0",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"typescript": "~4.2.3",
"@angular-eslint/builder": "12.0.0",
"@angular-eslint/eslint-plugin": "12.0.0",
"@angular-eslint/eslint-plugin-template": "12.0.0",
"@angular-eslint/schematics": "12.0.0",
"@angular-eslint/template-parser": "12.0.0",
"@typescript-eslint/eslint-plugin": "4.23.0",
"@typescript-eslint/parser": "4.23.0",
"codecov": "^3.8.1",
"eslint": "^7.26.0",
"ng-packagr": "^12.0.2",
"@types/file-saver": "^2.0.0",
"file-saver": "^2.0.0"
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.5.2",
"@angular-eslint/builder": "^13.0.1",
"@angular-eslint/eslint-plugin": "^13.0.1",
"@angular-eslint/eslint-plugin-template": "^13.0.1",
"@angular-eslint/schematics": "^13.0.1",
"@angular-eslint/template-parser": "^13.0.1",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"codecov": "^3.8.3",
"eslint": "^8.5.0",
"ng-packagr": "^13.1.2",
"@types/file-saver": "^2.0.4",
"file-saver": "^2.0.5"
}
}
7 changes: 6 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
Expand All @@ -16,7 +18,10 @@
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": ["es2018", "dom"],
"lib": [
"es2020",
"dom"
],
"paths": {
"ngx-filesaver": ["lib/index"]
}
Expand Down

0 comments on commit 9d1b5a9

Please sign in to comment.