From 60da1e1b3cbf933c8b1159d5c88e9cc36b2ae110 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 5 Apr 2024 14:45:31 -0400 Subject: [PATCH] Collections - migrated to meteor-packages repo --- .versions | 105 +++++++++++++++++----------------- CHANGELOG.md | 5 ++ README.md | 2 + package.js | 15 +++-- schema-tests/.meteor/versions | 1 - schema.js | 10 ++-- 6 files changed, 73 insertions(+), 65 deletions(-) diff --git a/.versions b/.versions index 440fa57..5d551f2 100644 --- a/.versions +++ b/.versions @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ff7d34..dabf551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index b74c0be..6e89acf 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.js b/package.js index 941514d..0fa32e7 100644 --- a/package.js +++ b/package.js @@ -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', }); @@ -12,18 +12,17 @@ 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'); @@ -31,7 +30,7 @@ Package.onUse(function (api) { }); 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']); }); diff --git a/schema-tests/.meteor/versions b/schema-tests/.meteor/versions index 8700fa3..91c7ccc 100644 --- a/schema-tests/.meteor/versions +++ b/schema-tests/.meteor/versions @@ -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 diff --git a/schema.js b/schema.js index e1df2b7..d87e41c 100644 --- a/schema.js +++ b/schema.js @@ -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'; @@ -56,7 +55,6 @@ function flattenSelector(selector) { return obj; } -checkNpmVersions({ 'simpl-schema': '>=0.0.0' }); const SimpleSchema = require('simpl-schema').default; @@ -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); @@ -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) {