Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: bump to v6.0.0 because of v17 support #1276

Merged
merged 4 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
},
"rules": {
"semi": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/semi": [
"error"
],
Expand All @@ -60,6 +61,13 @@
"plugin:@nx/javascript"
],
"rules": {}
},
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": "error"
}
}
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [6.0.0](https://github.com/valor-software/ng2-file-upload/compare/v5.0.0...v6.0.0) (2024-07-02)
* Added angular 17 support


# [5.0.0](https://github.com/valor-software/ng2-file-upload/compare/v4.0.0...v5.0.0) (2023-07-21)


Expand Down
Binary file added apps/demo/server/uploads/unnamed1719848822817.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/demo/src/app/components/file-upload/simple-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class SimpleDemoComponent {
disableMultipart: true, // 'DisableMultipart' must be 'true' for formatDataFunction to be called.
formatDataFunctionIsAsync: true,
formatDataFunction: async item => {
return new Promise((resolve, reject) => {
return new Promise((resolve, ) => {
resolve({
name: item._file.name,
length: item._file.size,
Expand Down
1 change: 1 addition & 0 deletions apps/demo/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ declare const PR:any;
// declare const global:any;
// eslint-disable-next-line @typescript-eslint/prefer-namespace-keyword
declare module jasmine {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Matchers<T> {
toHaveCssClass(expected: any): boolean;
}
Expand Down
8 changes: 4 additions & 4 deletions libs/ng2-file-upload/file-upload/file-uploader.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,21 +344,21 @@ export class FileUploader {
};
xhr.onload = () => {
const headers = this._parseHeaders(xhr.getAllResponseHeaders());
const response = this._transformResponse(xhr.response, headers);
const response = this._transformResponse(xhr.response);
const gist = this._isSuccessCode(xhr.status) ? 'Success' : 'Error';
const method = `_on${gist}Item`;
(this as any)[ method ](item, response, xhr.status, headers);
this._onCompleteItem(item, response, xhr.status, headers);
};
xhr.onerror = () => {
const headers = this._parseHeaders(xhr.getAllResponseHeaders());
const response = this._transformResponse(xhr.response, headers);
const response = this._transformResponse(xhr.response);
this._onErrorItem(item, response, xhr.status, headers);
this._onCompleteItem(item, response, xhr.status, headers);
};
xhr.onabort = () => {
const headers = this._parseHeaders(xhr.getAllResponseHeaders());
const response = this._transformResponse(xhr.response, headers);
const response = this._transformResponse(xhr.response);
this._onCancelItem(item, response, xhr.status, headers);
this._onCompleteItem(item, response, xhr.status, headers);
};
Expand Down Expand Up @@ -446,7 +446,7 @@ export class FileUploader {
return (status >= 200 && status < 300) || status === 304;
}

protected _transformResponse(response: string, headers: ParsedResponseHeaders): string {
protected _transformResponse(response: string): string {
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion libs/ng2-file-upload/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-file-upload",
"version": "5.0.0",
"version": "6.0.0",
"description": "Angular file uploader",
"author": "Dmitriy Shekhovtsov <valorkin@gmail.com>",
"license": "MIT",
Expand Down
3 changes: 1 addition & 2 deletions libs/ng2-file-upload/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
],
"options": {
"tsConfig": "libs/ng2-file-upload/tsconfig.lib.json",
"project": "libs/ng2-file-upload/ng-package.json",
"updateBuildableProjectDepsInPackageJson": true
"project": "libs/ng2-file-upload/ng-package.json"
},
"configurations": {
"production": {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-file-upload-demo",
"version": "5.0.0",
"version": "6.0.0",
"private": true,
"description": "Angular file upload directives",
"scripts": {
Expand Down
Loading