Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
Collections - migrated to meteor-packages repo
Browse files Browse the repository at this point in the history
  • Loading branch information
filipenevola committed Apr 5, 2024
1 parent f10dc30 commit 60da1e1
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 65 deletions.
105 changes: 54 additions & 51 deletions .versions
Original file line number Diff line number Diff line change
@@ -1,53 +1,56 @@
allow-deny@2.0.0-alpha300.18
babel-compiler@7.11.0-alpha300.18
babel-runtime@1.5.2-alpha300.18
base64@1.0.13-alpha300.18
binary-heap@1.0.12-alpha300.18
boilerplate-generator@2.0.0-alpha300.18
callback-hook@1.6.0-alpha300.18
check@1.3.3-alpha300.18
core-runtime@1.0.0-alpha300.18
ddp@1.4.2-alpha300.18
ddp-client@3.0.0-alpha300.18
ddp-common@1.4.1-alpha300.18
ddp-server@3.0.0-alpha300.18
diff-sequence@1.1.3-alpha300.18
dynamic-import@0.7.4-alpha300.18
ecmascript@0.16.8-alpha300.18
ecmascript-runtime@0.8.2-alpha300.18
ecmascript-runtime-client@0.12.2-alpha300.18
ecmascript-runtime-server@0.11.1-alpha300.18
ejson@1.1.4-alpha300.18
facts-base@1.0.2-alpha300.18
fetch@0.1.4-alpha300.18
geojson-utils@1.0.12-alpha300.18
id-map@1.2.0-alpha300.18
inter-process-messaging@0.1.2-alpha300.18
logging@1.3.3-alpha300.18
meteor@2.0.0-alpha300.18
minimongo@2.0.0-alpha300.18
modern-browsers@0.1.10-alpha300.18
modules@0.19.1-alpha300.18
modules-runtime@0.13.2-alpha300.18
mongo@2.0.0-alpha300.18
mongo-decimal@0.1.4-alpha300.18
mongo-dev-server@1.1.1-alpha300.18
mongo-id@1.0.9-alpha300.18
npm-mongo@4.16.1-alpha300.18
ordered-dict@1.2.0-alpha300.18
promise@1.0.0-alpha300.18
quave:collections@2.0.0
allow-deny@2.0.0-beta300.7
autopublish@1.0.8-beta300.7
babel-compiler@7.11.0-beta300.7
babel-runtime@1.5.2-beta300.7
base64@1.0.13-beta300.7
binary-heap@1.0.12-beta300.7
boilerplate-generator@2.0.0-beta300.7
callback-hook@1.6.0-beta300.7
check@1.3.3-beta300.7
core-runtime@1.0.0-beta300.7
ddp@1.4.2-beta300.7
ddp-client@3.0.0-beta300.7
ddp-common@1.4.1-beta300.7
ddp-server@3.0.0-beta300.7
diff-sequence@1.1.3-beta300.7
dynamic-import@0.7.4-beta300.7
ecmascript@0.16.8-beta300.7
ecmascript-runtime@0.8.2-beta300.7
ecmascript-runtime-client@0.12.2-beta300.7
ecmascript-runtime-server@0.11.1-beta300.7
ejson@1.1.4-beta300.7
facts-base@1.0.2-beta300.7
fetch@0.1.4-beta300.7
geojson-utils@1.0.12-beta300.7
id-map@1.2.0-beta300.7
insecure@1.0.8-beta300.7
inter-process-messaging@0.1.2-beta300.7
local-test:quave:collections@2.0.1
logging@1.3.3-beta300.7
meteor@2.0.0-beta300.7
minimongo@2.0.0-beta300.7
modern-browsers@0.1.10-beta300.7
modules@0.19.1-beta300.7
modules-runtime@0.13.2-beta300.7
mongo@2.0.0-beta300.7
mongo-decimal@0.1.4-beta300.7
mongo-dev-server@1.1.1-beta300.7
mongo-id@1.0.9-beta300.7
npm-mongo@4.16.1-beta300.7
ordered-dict@1.2.0-beta300.7
promise@1.0.0-beta300.7
quave:collections@2.0.1
quave:settings@1.0.0
raix:eventemitter@1.0.0
random@1.2.2-alpha300.18
react-fast-refresh@0.2.8-alpha300.18
reload@1.3.2-alpha300.18
retry@1.1.1-alpha300.18
routepolicy@1.1.2-alpha300.18
socket-stream-client@0.5.2-alpha300.18
tmeasday:check-npm-versions@1.0.2
tracker@1.3.3-alpha300.18
typescript@4.9.5-alpha300.18
underscore@1.0.14-alpha300.18
webapp@2.0.0-alpha300.18
webapp-hashing@1.1.2-alpha300.18
random@1.2.2-beta300.7
react-fast-refresh@0.2.8-beta300.7
reload@1.3.2-beta300.7
retry@1.1.1-beta300.7
routepolicy@1.1.2-beta300.7
socket-stream-client@0.5.2-beta300.7
tinytest@2.0.0-beta300.7
tracker@1.3.3-beta300.7
typescript@5.4.3-beta300.7
underscore@1.0.14-beta300.7
webapp@2.0.0-beta300.7
webapp-hashing@1.1.2-beta300.7
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## CHANGELOG

### 2.0.1 (2023-03-22)

- Fixes `Exception running scheduled job TypeError: context.invalidKeys is not a function`
- Removes `import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';` due to old typescript dependency

### 2.0.0 (2023-11-15)

- Compatible with Meteor 3.0 (hooks and helpers are still not supported tho)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# quave:collections

### MIGRATED TO https://github.com/quavedev/meteor-packages/tree/main/collections

`quave:collections` is a Meteor package that allows you to create your collections in a standard way.

Features
Expand Down
15 changes: 7 additions & 8 deletions package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'quave:collections',
version: '2.0.0',
version: '2.0.1',
summary: 'Utility package to create Meteor collections in a standard way',
git: 'https://github.com/quavedev/collections',
});
Expand All @@ -12,26 +12,25 @@ Npm.depends({
});

Package.onUse(function (api) {
api.versionsFrom('METEOR@3.0-alpha.18');
api.versionsFrom('3.0-beta.7');

api.use([
'ecmascript@0.16.7||0.16.8-alpha300.18',
'mongo@1.0.0||2.0.0||2.0.0-alpha300.17',
'minimongo@1.9.3||2.0.0-alpha300.18',
'ejson@1.1.3||1.1.4-alpha300.18',
'ecmascript@0.16.7||0.16.8-beta300.7',
'mongo@1.0.0||2.0.0||2.0.0-beta300.7',
'minimongo@1.9.3||2.0.0-beta300.7',
'ejson@1.1.3||1.1.4-beta300.7',
]);
api.imply('mongo');

api.use('raix:eventemitter@1.0.0');
api.use('tmeasday:check-npm-versions@1.0.2');

api.use('quave:settings@1.0.0');

api.mainModule('collections.js');
});

Package.onTest(function (api) {
api.use(['ecmascript', 'tinytest', 'insecure', 'autopublish', 'mongo']);
api.use(['ecmascript@0.16.7||0.16.8-beta300.7', 'tinytest', 'insecure', 'autopublish', 'mongo@1.0.0||2.0.0||2.0.0-beta300.7']);

api.addFiles(['helpers.js', 'helpers-test.js']);
});
1 change: 0 additions & 1 deletion schema-tests/.meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ templating@1.4.1
templating-compiler@1.4.1
templating-runtime@1.5.0
templating-tools@1.2.0
tmeasday:check-npm-versions@1.0.2
tracker@1.3.2
typescript@4.9.4
ui@1.0.13
Expand Down
10 changes: 5 additions & 5 deletions schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import { EventEmitter } from 'meteor/raix:eventemitter';
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
import { EJSON } from 'meteor/ejson';
import isEmpty from 'lodash.isempty';
import isEqual from 'lodash.isequal';
Expand Down Expand Up @@ -56,7 +55,6 @@ function flattenSelector(selector) {

return obj;
}
checkNpmVersions({ 'simpl-schema': '>=0.0.0' });

const SimpleSchema = require('simpl-schema').default;

Expand Down Expand Up @@ -673,13 +671,14 @@ function doValidate(
}
}

function getErrorObject(context, appendToMessage = '') {
function getErrorObject(context, appendToMessage = '', code) {
let message;
const invalidKeys =
typeof context.validationErrors === 'function'
? context.validationErrors()
: context.invalidKeys();
if (invalidKeys.length) {
: context.invalidKeys?.();

if (invalidKeys?.length) {
const firstErrorKey = invalidKeys[0].name;
const firstErrorMessage = context.keyErrorMessage(firstErrorKey);

Expand All @@ -697,6 +696,7 @@ function getErrorObject(context, appendToMessage = '') {
const error = new Error(message);
error.invalidKeys = invalidKeys;
error.validationContext = context;
error.code = code;
// If on the server, we add a sanitized error, too, in case we're
// called from a method.
if (Meteor.isServer) {
Expand Down

0 comments on commit 60da1e1

Please sign in to comment.