Releases: veliovgroup/Meteor-Files
Releases · veliovgroup/Meteor-Files
v3.0.1
This is patch release fixing minor issues
- 🔧 Fix FileObject data in upload events via
httptransport - 📔 Harden documentation
- See notes from major
v3release
v3.0.0
- 📦 Packosphere
@3.0.0 - ☄️ AtmosphereJS
@3.0.0 - ✨ Refactored files.veliov.com demo app and its 📦 source code
Summary
- ✨ Refactor: Hook options:
protected,onBeforeRemove,onAfterRemove,onInitiateUpload,onAfterUpload,namingFunctionare now async - 🤝 Refactor: Compatibility with
meteor@3and other modern packages - ☄️ Refactor: Match
FilesCollectionAPIs with new*Asyncmethods ofMongo.Collection; Deprecate callback APIs on the Server - 👨💻 Refactor: Utilize node's async APIs where suitable
- 👨💻 Refactor: Improve pause/resume logic on connection interruption/reconnect
- 📔 Docs: Updated and refactored docs with better examples
- 📔 Docs: Refactored JSDoc matching definitions in TypeScript
- 🤓 Dev: Improved TypeScript support
- 👷♂️ Dev: Improved debugging logs
- 👨🔬 Tests: Improved test-suite
- 👷♂️ Git: CI GitHub Action Workflows for lint and build tests
Contributors
Special thanks to: @bratelefant @harryadel @jankapunkt @StorytellerCZ @make-github-pseudonymous-again an other contributors who helped to build and pushed v3 release forward
Major changes
FilesCollection:
⚠️ FilesCollection#remove()— deprecated on server, useFilesCollection#removeAsyncinstead⚠️ FilesCollection#findOne()— deprecated on server, useFilesCollection#findOneAsyncinstead⚠️ FilesCollection#unlink()— deprecated on server, useFilesCollection#unlinkAsyncinstead⚠️ FilesCollection#write()— deprecated on server, useFilesCollection#writeAsyncinstead⚠️ FilesCollection#load()— deprecated on server, useFilesCollection#loadAsyncinstead
FileCursor:
⚠️ FileCursor#remove()— deprecated on server, useFileCursor#removeAsyncinstead
FilesCursor:
⚠️ FilesCursor#remove()— deprecated on server, useFilesCursor#removeAsyncinstead⚠️ FilesCursor#hasNext()- deprecated, useFilesCursor#hasNextAsyncinstead⚠️ FilesCursor#count()- deprecated, useFilesCursor#countDocumentsinstead⚠️ FilesCursor#countAsync()- deprecated, useFilesCursor#countDocumentsinstead
FileUpload:
⚠️ FileUpload#start()is now async!- ✨ New
FileUpload#remainingTime{ReactiveVar} with upload remaining time in human-readable format
Callbacks and hooks:
⚠️ Anywhere:this.user()is deprecated, usethis.userAsync()instead⚠️ Client:FileUploadnow always triggersendeven in the case of successful and failed uploads; Before:endevent wasn't called under certain conditions⚠️ Client: All errors appeared during upload in all hooks and events ofFileUploadare now instance ofMeteor.Error; Before: Errors had mixed type or were simply text⚠️ Client: Errors are the same now (type, code, text, reason, details) within DDP and HTTP protocols; Before: DDP and HTTP protocols had different errors⚠️ Client: The next private events were removed fromUploadInstanceClass:upload,sendEOF,prepare,sendChunk,proceedChunk
New methods
FilesCollection:
- ✨ Client:
FilesCollection#insertAsync() - ✨ Anywhere:
FilesCollection#updateAsync() - ✨ Anywhere:
FilesCollection#removeAsync() - ✨ Anywhere:
FilesCollection#findOneAsync() - ✨ Anywhere:
FilesCollection#countDocuments() - ✨ Anywhere:
FilesCollection#estimatedDocumentCount() - ✨ Server:
FilesCollection#unlinkAsync() - ✨ Server:
FilesCollection#writeAsync() - ✨ Server:
FilesCollection#loadAsync()
FileUpload:
- ✨ New
FileUpload#remainingTime{ReactiveVar} with upload remaining time in human-readable format
FileCursor:
- ✨ Anywhere:
FileCursor#removeAsync() - ✨ Anywhere:
FileCursor#fetchAsync() - ✨ Anywhere:
FileCursor#withAsync()
FilesCursor:
- ✨ Anywhere:
FilesCursor#getAsync() - ✨ Anywhere:
FilesCursor#hasNextAsync() - ✨ Anywhere:
FilesCursor#nextAsync() - ✨ Anywhere:
FilesCursor#hasPreviousAsync() - ✨ Anywhere:
FilesCursor#previousAsync() - ✨ Anywhere:
FilesCursor#removeAsync() - ✨ Anywhere:
FilesCursor#fetchAsync() - ✨ Anywhere:
FilesCursor#firstAsync() - ✨ Anywhere:
FilesCursor#lastAsync() - ✨ Anywhere:
FilesCursor#countDocuments() - ✨ Anywhere:
FilesCursor#forEachAsync() - ✨ Anywhere:
FilesCursor#eachAsync() - ✨ Anywhere:
FilesCursor#mapAsync() - ✨ Anywhere:
FilesCursor#currentAsync() - ✨ Anywhere:
FilesCursor#observeAsync() - ✨ Anywhere:
FilesCursor#observeChangesAsync()
New features
- ✨ Client:
FileUpload#remainingTimeReactiveVar — returns remaining upload time inhh:mm:ssformat;
Other changes
- 🐞 Bug: Fixed #885 — Upload empty file now
endupload with error - 🐞 Bug: Fixed #901 — Caused by #894
- 🔧 Security: Fixed #894 — now
x_mtokcookie is set withsecureandhttpOnlyflags - 🔧 Refactor: Fixed
FileCursor#withimplementation - ✨ Refactor:
FileUpload#abortis nowasync - ✨ Server:
FilesCollection#addFileis now async - ✨ Server:
FilesCollection#downloadis now async - ✨ Server:
WriteStreamClass is now available for import - ⚙️ Client:
disableUploadoption processed on the client and returns error in theend/errorevents, andonErrorhooks. Before — throws an error upon calling.insert()method
Dependencies
release:
eventemitter3@5.0.1, was4.0.7- removed:
abort-controller, now using nativeAbortController - removed:
fs-extra, now using nativefs
dev:
- added:
chai@4.5.0 - added:
sinon@7.5.0
v2.3.3
v2.3.2
v2.3.1
Changes:
- 👨💻 Improve
createIndexhelper - 👨💻 Improve error output when FileSystem destination not writable; Related to #857, thanks to @Leekao
- 🐞 Fix custom
allowedOriginsoption for CORS; Closing #850, thanks to @djlogan2; - 📔 Improve AWS S3 documentation, by @xsyann;
Notes:
- 👨🔬 Tested with latest release of
meteor@2.8.0
v2.3.0
New features:
- ✨
opts.sanitizemethod, read more in Constructor docs; Thanks to @xet7 and @mfilser
Other Changes:
- 👷♂️ Minor codebase enhancements and cleanups
v2.2.1
v2.2.0
Breaking Changes
⚠️ Changes innamingFunction, — now naming function acts the same on the Client and Server, upon insert, load, and write. Test your implementation with changed logic. Output of Server function supersedes Client's function output
Changes
- 📔 Merge #843 and fix #820, thanks to @Prinzhorn
- 📔 Documentation refactoring focused on examples and its simplifications
- 👨💻 Support nested custom path returned from
namingFunction - 👨💻 Fix
namingFunctionbehavior on Client and Server in upload, load, and write methods, closing #842; Thanks to @chrschae - 👷♂️ Now library exports its helpers
import { FilesCollection, helpers }; - 👷♂️ Add
.meteorignoreto minimize package's footprint
v2.1.1
- 👷♂️ Fix index creation (ensure)
v2.1.0
Major changes:
⚠️ FSNamenow sanitized and limited to 28 symbols, no white-spaces allowed⚠️ fileIdnow sanitized and limited to 20 symbols, no white-spaces allowed⚠️ File extension now sanitized and limited to 20 symbols, no white-spaces allowed- 📦 Decouple
fs-extra, use native node.jsfsmodule - 👨💻 Add missing
isDatahelper via #795, by @harryadel
Changes:
- 👷♂️ Fix: #827, thanks to @aertms
- 👷♂️ Fix: #832, thanks to @polygonwood
- 👷♂️ Fix: #813, thanks to @Prinzhorn
- 👨💻 Fix: #834, thanks to @bladerunner2020
- 📔 Fix: #803, thanks to @bartenra
- 🏗 Sanitize inputs (
FSName,fileId,extension) to avoid command injection - 📔 Improved documentation, special thanks to @Prinzhorn and @make-github-pseudonymous-again
- 📔 GridFS documentation fix: #818
- 👷♂️ Utilize
Meteor._debugwhere possible instead ofconsole.log
Other:
- 🤝 Compatibility with
meteor@2.7.3