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

Issue 19: Preparation for release of 1.0.0 #21

Merged
merged 4 commits into from
May 9, 2018

Conversation

OldSneerJaw
Copy link
Owner

@OldSneerJaw OldSneerJaw commented May 9, 2018

Description

  • Updated the changelog
  • Updated the package's version number
  • Removed documentation for attachment size constraints from README (explanation)
  • Documented the lack of CommonJS module support

Related Issue

The attachment size constraints (i.e. `attachmentConstraints.maximumIndividualSize`, `attachmentConstraints.maximumTotalSize` and the `attachmentReference` validation type's `maximumSize`) cannot be applied correctly to CouchDB documents due to a performance optimization that makes it impossible for a validation function to determine the size of an attachment as it is being created ([more info](apache/couchdb#1320)). The documentation has been updated to remove mention of the attachment size constraints, since they cannot be enforced. They will be removed from the code altogether in the future.
* `maximumAttachmentCount`: (optional) The maximum number of attachments that may be assigned to a single document of this type. In addition to a static value (e.g. `maximumAttachmentCount: 2`), this constraint may also be assigned a value dynamically via a function (e.g. `maximumAttachmentCount: function(newDoc, oldDoc) { ... }`) where the parameters are as follows: (1) the new document (if deleted, the `_deleted` property will be `true`) and (2) the document that is being replaced (if any; it will be `null` if it has been deleted or does not exist). Unlimited by default.
* `maximumIndividualSize`: (optional) The maximum file size, in bytes, allowed for any single attachment assigned to a document of this type. In addition to a static value (e.g. `maximumIndividualSize: 256`), this constraint may also be assigned a value dynamically via a function (e.g. `maximumIndividualSize: function(newDoc, oldDoc) { ... }`) where the parameters are as follows: (1) the new document (if deleted, the `_deleted` property will be `true`) and (2) the document that is being replaced (if any; it will be `null` if it has been deleted or does not exist). Unlimited by default.
* `maximumTotalSize`: (optional) The maximum total size, in bytes, of _all_ attachments assigned to a single document of this type. In other words, when the sizes of all of a document's attachments are added together, it must not exceed this value. In addition to a static value (e.g. `maximumTotalSize: 1024`), this constraint may also be assigned a value dynamically via a function (e.g. `maximumTotalSize: function(newDoc, oldDoc) { ... }`) where the parameters are as follows: (1) the new document (if deleted, the `_deleted` property will be `true`) and (2) the document that is being replaced (if any; it will be `null` if it has been deleted or does not exist). Unlimited by default.
Copy link
Owner Author

@OldSneerJaw OldSneerJaw May 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The attachment size constraints (i.e. attachmentConstraints.maximumIndividualSize, attachmentConstraints.maximumTotalSize and the attachmentReference validation type's maximumSize) cannot be applied correctly to CouchDB documents due to a performance optimization that makes it impossible for a validation function to determine the size of an attachment as it is being created (more info). The documentation has been updated to remove mention of the attachment size constraints, since they cannot be enforced reliably. They will be removed from the code altogether in the future (see issue #22).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Updated the README to mention this limitation of couchster.
Copy link
Collaborator

@dkichler dkichler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -1,7 +1,7 @@
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/). All notable changes will be documented in this file.

## [Unreleased]
## [1.0.0] - 2018-05-10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you'll wait until tomorrow to pull the trigger? :shipit:

@dkichler dkichler merged commit 26d1431 into master May 9, 2018
@dkichler dkichler deleted the issue-19-release-1.0.0 branch May 9, 2018 22:43
@dkichler dkichler mentioned this pull request May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants