Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pure-upload

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-upload - npm Package Compare versions

Comparing version 7.1.0 to 8.0.0

8

CHANGELOG.md
# CHANGELOG
## 8.0.0
Fix audit findings in dependencies
Update TS@4.4.2
## 7.1.0
Fixed allowed files types for "*" and "*.*".
Fixed allowed files types for "_" and "_.\*".
Added validateMissingExtension check

@@ -6,0 +12,0 @@

@@ -141,2 +141,4 @@ "use strict";

if (path === void 0) { path = ""; }
if (!entry)
return;
if (this.isFileSystemDirectoryEntry(entry))

@@ -143,0 +145,0 @@ this.processDirectoryEntry(entry, path, callback);

64

index.ts

@@ -145,10 +145,4 @@ export function addEventHandler(

type ErrorCallback = (err: DOMException) => void;
type FileCallback = (file: File) => void;
type FilesCallback = (file: File[]) => void;
type FileSystemEntriesCallback = (entries: FileSystemEntry[]) => void;
interface FileSystemEntry {

@@ -233,3 +227,3 @@ readonly isDirectory: boolean;

callback = this.callbackAfter(items.length, callback);
this.toValidItems(items).forEach(item => this.processEntry(item.webkitGetAsEntry(), "", callback));
this.toValidItems(items).forEach((item) => this.processEntry(item.webkitGetAsEntry(), "", callback));
}

@@ -239,6 +233,7 @@

callback = this.callbackAfter(entries.length, callback);
entries.forEach(entry => this.processEntry(entry, path, callback));
entries.forEach((entry) => this.processEntry(entry, path, callback));
}
private processEntry(entry: FileSystemEntry, path: string = "", callback?: () => void): void {
private processEntry(entry: FileSystemEntry | null, path: string = "", callback?: () => void): void {
if (!entry) return;
if (this.isFileSystemDirectoryEntry(entry)) this.processDirectoryEntry(entry, path, callback);

@@ -253,3 +248,3 @@ else if (this.isFileSystemFileEntry(entry)) this.processFileEntry(entry, path, callback);

.readEntries(
entries => this.processEntries(entries, path + "/" + entry.name, callback),
(entries) => this.processEntries(entries, path + "/" + entry.name, callback),
this.pushAndCallback(this.errors, callback)

@@ -260,3 +255,3 @@ );

private processFileEntry(entry: FileSystemFileEntry, path: string = "", callback?: () => void): void {
entry.file(file => this.processFile(file, path, callback), this.pushAndCallback(this.errors, callback));
entry.file((file) => this.processFile(file, path, callback), this.pushAndCallback(this.errors, callback));
}

@@ -1030,32 +1025,29 @@

export class Uploader {
uploadAreas: UploadArea[];
queue: UploadQueue;
options: IUploadQueueOptions;
uploadAreas: UploadArea[];
queue: UploadQueue;
options: IUploadQueueOptions;
constructor(
options: IUploadQueueOptions = {},
callbacks: IUploadQueueCallbacks = {}
) {
this.options = options;
this.uploadAreas = [];
this.queue = new UploadQueue(options, callbacks);
}
constructor(options: IUploadQueueOptions = {}, callbacks: IUploadQueueCallbacks = {}) {
this.options = options;
this.uploadAreas = [];
this.queue = new UploadQueue(options, callbacks);
}
registerArea(element: HTMLElement, options: IUploadAreaOptions): UploadArea {
const uploadArea = new UploadArea(element, options, this);
this.uploadAreas.push(uploadArea);
return uploadArea;
}
registerArea(element: HTMLElement, options: IUploadAreaOptions): UploadArea {
const uploadArea = new UploadArea(element, options, this);
this.uploadAreas.push(uploadArea);
return uploadArea;
}
unregisterArea(area: UploadArea): void {
const areaIndex = this.uploadAreas.indexOf(area);
if (areaIndex >= 0) {
this.uploadAreas[areaIndex].destroy();
this.uploadAreas.splice(areaIndex, 1);
unregisterArea(area: UploadArea): void {
const areaIndex = this.uploadAreas.indexOf(area);
if (areaIndex >= 0) {
this.uploadAreas[areaIndex].destroy();
this.uploadAreas.splice(areaIndex, 1);
}
}
}
get firstUploadArea(): UploadArea | undefined {
return this.uploadAreas[0];
}
get firstUploadArea(): UploadArea | undefined {
return this.uploadAreas[0];
}
}

@@ -1062,0 +1054,0 @@

{
"name": "pure-upload",
"version": "7.1.0",
"version": "8.0.0",
"description": "The pure upload library without dependencies",

@@ -45,13 +45,11 @@ "author": {

"gulp-flatten": "^0.4.0",
"gulp-foreach": "^0.1.0",
"gulp-insert": "^0.5.0",
"gulp-karma": "0.0.5",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"gulp-tap": "^2.0.0",
"gulp-typescript": "^6.0.0-alpha.1",
"gulp-uglify": "^3.0.2",
"gulp-watch": "^5.0.1",
"gulp4-run-sequence": "^1.0.1",
"jasmine-core": "^3.5.0",
"karma": "^5.0.4",
"karma": "^6.3.4",
"karma-chrome-launcher": "^3.1.0",

@@ -63,6 +61,13 @@ "karma-jasmine": "^4.0.1",

"multer": "^1.4.2",
"npm-force-resolutions": "0.0.10",
"prettier": "^2.0.5",
"typescript": "^4.0.3"
"typescript": "^4.4.2"
},
"dependencies": {}
"dependencies": {},
"resolutions": {
"glob-parent": "^6.0.1"
},
"scripts": {
"preinstall": "npx npm-force-resolutions"
}
}

@@ -16,4 +16,3 @@ declare module "pure-upload" {

export function newGuid(): string;
export type ErrorCallback = (err: DOMException) => void;
type FilesCallback = (file: File[]) => void;
export type FilesCallback = (file: File[]) => void;
export interface IFullUploadAreaOptions extends IUploadAreaOptions {

@@ -252,3 +251,2 @@ maxFileSize: number;

}
export {};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc