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

Triggers deprecation warnings in Meteor 3.1.1 allow-deny package #462

Open
perbergland opened this issue Dec 16, 2024 · 6 comments
Open

Comments

@perbergland
Copy link

Run in a project with Meteor 3 (beta 1) and use the collection.attach method after having enhanced the allow-deny package to include a stack trace.

Result:

deny: The "insertAsync" key is deprecated. Use "insert" instead. Error
    at packages/allow-deny/allow-deny.js:557:97
    at Array.forEach (<anonymous>)
    at addValidator (packages/allow-deny/allow-deny.js:549:24)
    at CollectionPrototype.deny (packages/allow-deny/allow-deny.js:72:3)
    at defineDeny (packages/aldeed:collection2/main.js:757:9)
    at Collection.c2AttachSchema [as attachSchema] (packages/aldeed:collection2/main.js:114:5)

and

deny: The "updateAsync" key is deprecated. Use "update" instead. Error
    at packages/allow-deny/allow-deny.js:557:97
    at Array.forEach (<anonymous>)
    at addValidator (packages/allow-deny/allow-deny.js:549:24)
    at CollectionPrototype.deny (packages/allow-deny/allow-deny.js:72:3)
    at defineDeny (packages/aldeed:collection2/main.js:757:9)
    at Collection.c2AttachSchema [as attachSchema] (packages/aldeed:collection2/main.js:114:5)

Unsure what a proper solution is, since the package needs to be compatible with Meteor 3.0 and 3.1 even if 3.1.1 fixes the allow/deny parameters bug.

Copy link

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee you issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.

Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know

@derwaldgeist
Copy link

derwaldgeist commented Feb 3, 2025

I got this error for the first time after upgrading from 3.0.4 to 3.1.1. It seems to be related to all .attachSchema() calls:

Image

@jankapunkt
Copy link
Member

From what I understand the allow-deny does not explicitly use inserAsync etc. but just insert because they are no MongoDB Collection methods but rather definitions.

The corresponding PRs are in Meteor core and are these:

@jankapunkt
Copy link
Member

@StorytellerCZ if I get it right we need to move the *Async allow-deny rules back to their normal names but handle them as promises. Would be a new minor release I can provide a PR

@jankapunkt
Copy link
Member

Please prefer #464

@derwaldgeist
Copy link

Thanks for the feedback!

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

No branches or pull requests

3 participants