Skip to content

Commit

Permalink
feat: add angular 16 support(#1258)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: Dmitriy Shekhovtsov valorkin <[email protected]>
  • Loading branch information
SvetlanaMuravlova and valorkin authored Jul 21, 2023
1 parent 6dbb644 commit 1fe752d
Show file tree
Hide file tree
Showing 23 changed files with 14,205 additions and 25,415 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
44 changes: 34 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,61 @@
"**/*"
],
"plugins": [
"@nrwl/nx"
"@nx"
],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": [
"*"
]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"parserOptions": { "project": "./tsconfig.*?.json" },
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"plugin:@nx/typescript"
],
"parserOptions": {
"project": "./tsconfig.*?.json"
},
"rules": {
"semi": "off",
"@typescript-eslint/semi": ["error"],
"@typescript-eslint/semi": [
"error"
],
"@typescript-eslint/ban-ts-comment": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"files": [
"*.js",
"*.jsx"
],
"extends": [
"plugin:@nx/javascript"
],
"rules": {}
}
]
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/on-push-or-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
runs-on: ubuntu-latest
needs: one_run
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/cache@v2.1.4
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
Expand All @@ -50,12 +50,12 @@ jobs:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/cache@v2.1.4
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2.1.4
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
Expand All @@ -66,8 +66,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -83,8 +83,8 @@ jobs:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -97,8 +97,8 @@ jobs:
outputs:
output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
Expand Down
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ Easy to use Angular2 directives for files upload ([demo](http://valor-software.g

[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)
[![Build Status](https://travis-ci.org/valor-software/ng2-file-upload.svg?branch=development)](https://travis-ci.org/valor-software/ng2-file-upload)
[![Dependency Status](https://david-dm.org/valor-software/ng2-file-upload.svg)](https://david-dm.org/valor-software/ng2-file-upload)

## Quick start

1. A recommended way to install ***ng2-file-upload*** is through [npm](https://www.npmjs.com/search?q=ng2-file-upload) package manager using the following command:

`npm i ng2-file-upload --save`
`npm i ng2-file-upload`

Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-file-upload/archive/master.zip).

Expand All @@ -18,7 +17,7 @@ Easy to use Angular2 directives for files upload ([demo](http://valor-software.g

3. More information regarding using of ***ng2-file-upload*** is located in
[demo](http://valor-software.github.io/ng2-file-upload/) and [demo sources](https://github.com/valor-software/ng2-file-upload/tree/master/demo).

## Using ***ng2-file-upload*** in a project

1. Install as shown in the above section.
Expand Down
9 changes: 0 additions & 9 deletions angular.json

This file was deleted.

4 changes: 2 additions & 2 deletions apps/demo/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"*.ts"
],
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {}
Expand All @@ -21,7 +21,7 @@
"*.html"
],
"extends": [
"plugin:@nrwl/nx/angular-template"
"plugin:@nx/angular-template"
],
"rules": {}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
"dependencies": true
}
],
"configurations": {
Expand Down Expand Up @@ -62,7 +62,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/demo/**/*.ts"
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../../scripts/polyfills.ts';
import './polyfills';

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
Expand Down
10 changes: 10 additions & 0 deletions apps/demo/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
*/

(window as any)['global'] = window;
2 changes: 1 addition & 1 deletion apps/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": [
"./src/main.ts",
"../../scripts/polyfills.ts"
"./src/polyfills.ts"
],
"include": [
"./src/typings.d.ts"
Expand Down
69 changes: 0 additions & 69 deletions decorate-angular-cli.js

This file was deleted.

2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { getJestProjects } = require('@nrwl/jest');
const { getJestProjects } = require('@nx/jest');

export default {"projects": getJestProjects()};
18 changes: 14 additions & 4 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;
module.exports = {
...nxPreset,
...{
...nxPreset,
...{
coverageReporters: ['text-summary', 'json', 'lcov']
}
},
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true }
}
4 changes: 2 additions & 2 deletions libs/ng2-file-upload/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"*.ts"
],
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {}
Expand All @@ -21,7 +21,7 @@
"*.html"
],
"extends": [
"plugin:@nrwl/nx/angular-template"
"plugin:@nx/angular-template"
],
"rules": {}
}
Expand Down
6 changes: 3 additions & 3 deletions libs/ng2-file-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Easy to use Angular2 directives for files upload ([demo](http://valor-software.g

[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)
[![Build Status](https://travis-ci.org/valor-software/ng2-file-upload.svg?branch=development)](https://travis-ci.org/valor-software/ng2-file-upload)
[![Dependency Status](https://david-dm.org/valor-software/ng2-file-upload.svg)](https://david-dm.org/valor-software/ng2-file-upload)


## Quick start

1. A recommended way to install ***ng2-file-upload*** is through [npm](https://www.npmjs.com/search?q=ng2-file-upload) package manager using the following command:

`npm i ng2-file-upload --save`
`npm i ng2-file-upload`

Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-file-upload/archive/master.zip).

Expand All @@ -18,7 +18,7 @@ Easy to use Angular2 directives for files upload ([demo](http://valor-software.g

3. More information regarding using of ***ng2-file-upload*** is located in
[demo](http://valor-software.github.io/ng2-file-upload/) and [demo sources](https://github.com/valor-software/ng2-file-upload/tree/master/demo).

## Using ***ng2-file-upload*** in a project

1. Install as shown in the above section.
Expand Down
Loading

0 comments on commit 1fe752d

Please sign in to comment.