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 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
quave:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
local-test:quave:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
quave:[email protected]
quave:[email protected]
raix:[email protected]
[email protected]alpha300.18
[email protected]alpha300.18
[email protected]alpha300.18
[email protected]alpha300.18
[email protected]alpha300.18
[email protected]alpha300.18
tmeasday:check-npm-versions@1.0.2
[email protected]alpha300.18
typescript@4.9.5-alpha300.18
[email protected]alpha300.18
[email protected]alpha300.18
[email protected]alpha300.18
[email protected]beta300.7
[email protected]beta300.7
[email protected]beta300.7
[email protected]beta300.7
[email protected]beta300.7
[email protected]beta300.7
tinytest@2.0.0-beta300.7
[email protected]beta300.7
typescript@5.4.3-beta300.7
[email protected]beta300.7
[email protected]beta300.7
[email protected]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([
'[email protected]||0.16.8-alpha300.18',
'[email protected]||2.0.0||2.0.0-alpha300.17',
'[email protected]||2.0.0-alpha300.18',
'[email protected]||1.1.4-alpha300.18',
'[email protected]||0.16.8-beta300.7',
'[email protected]||2.0.0||2.0.0-beta300.7',
'[email protected]||2.0.0-beta300.7',
'[email protected]||1.1.4-beta300.7',
]);
api.imply('mongo');

api.use('raix:[email protected]');
api.use('tmeasday:[email protected]');

api.use('quave:[email protected]');

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 @@ [email protected]
[email protected]
[email protected]
[email protected]
tmeasday:[email protected]
[email protected]
[email protected]
[email protected]
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.