meteor-collection-helpers icon indicating copy to clipboard operation
meteor-collection-helpers copied to clipboard

fixes package for Meteor 2.3 and Meteor 3.0

Open drone1 opened this issue 1 year ago • 7 comments

passes all tests for meteor 1.12.1, 2.3, 3.0.3

drone1 avatar Sep 28 '24 22:09 drone1

Hey! Thanks for the reply.

To be honest I copied this from aldeed:collections2, which works with modern versions of Meteor, and it fixed it – I’m not sure what it means to have three minimum versions.

On Sun 29. Sep 2024 at 22:57, David Burles @.***> wrote:

@.**** commented on this pull request.

In package.js https://github.com/dburles/meteor-collection-helpers/pull/88#discussion_r1780170032 :

documentation: "README.md", git: "https://github.com/dburles/meteor-collection-helpers.git", });

Package.onUse(function(api) {

  • api.versionsFrom('1.4.2');
  • api.versionsFrom(['1.12.1', '2.3', '3.0']);

Hey @drone1 https://github.com/drone1 just wondering why the minimum version bump here is required?

— Reply to this email directly, view it on GitHub https://github.com/dburles/meteor-collection-helpers/pull/88#pullrequestreview-2335997014, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPAWY6A7QI5CC52CZCLZZBSUDAVCNFSM6AAAAABPA7LCPSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMZVHE4TOMBRGQ . You are receiving this because you were mentioned.Message ID: @.***>

drone1 avatar Sep 30 '24 12:09 drone1

In a new meteor 3.0.3 Blaze project, if I run:

meteor add dburles:collection-helpers

it installs an outdated version, v1.0.0. If I remove that package and attempt to install v1.1.0, the most recent version, with

meteor add dburles:[email protected]

I get the following errors:

 => Errors while adding packages:

While selecting package versions:
error: Conflict: Constraint [email protected] is not satisfied by mongo 2.0.2.
Constraints on package "mongo":
* [email protected] <- top level
* mongo@~2.0.2 <- top level
* [email protected] <- dburles:collection-helpers 1.1.0

Is that expected?

I get the same errors if I attempt to meteor add with --allow-incompatible-update.

drone1 avatar Oct 15 '24 13:10 drone1

In a Meteor 3.0.3 project, if I try to add my local package (with the corrected api.versionsFrom('1.4.2') line), combined with some other common packages (see below) installed, I get this error:

   While selecting package versions:
   error: Conflict: Constraint [email protected] is not satisfied by mongo 2.0.2.
   Constraints on package "mongo":
   * [email protected] <- top level
   * mongo@~2.0.2 <- top level
   * [email protected] <- reactive-dict 1.3.2 <- ostrio:flow-router-extra
   3.11.0-rc300.1
   * [email protected] <- dburles:collection-helpers 1.0.0
   * [email protected] || 1.12.0 || 2.0.0 <- aldeed:collection2 4.0.3
   * [email protected] <- accounts-base 3.0.2
   * [email protected] || 2.0.0 <- alanning:roles 4.0.0   

However, if I change the line to api.versionsFrom(['1.4.2', '2.3', '3.0']) (NOTE: I fixed the issue you mentioned in this comment), no errors.

Actually, I can't even get into a state where I can test the original problem I was having, because I cannot install versions 1.0.0 or 1.1.0 to my project, even with --allow-incompatible-update. (Reminder: the original problem was that helpers simply did not exist on the client.)

But yes, tests pass for Meteor 2.3 and 3.0.

However I can't get up and running with Meteor 1.4.2:

> meteor test-packages ./packages/collection-helpers --release 1.4.2

[[[[[ Tests ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]_1...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

   While downloading [email protected]...:
   error: unable to get local issuer certificate

=> Your application has errors. Waiting for file change.

.meteor/packages:

[email protected]             # Packages every Meteor app needs to have
[email protected]                   # The database Meteor supports right now
jquery                  # Wrapper package for npm-installed jquery

[email protected]   # CSS minifier run for production mode
[email protected]    # JS minifier run for production mode
[email protected]                # ECMAScript 5 compatibility for older browsers
[email protected]              # Enable ECMAScript2015+ syntax in app code

[email protected]  # Update code in development without reloading the page

dburles:[email protected]

I tried running with METEOR_NO_HTTPS=1 but no luck. Have you seen these errors before? Any suggestions?

Thanks.

drone1 avatar Oct 15 '24 14:10 drone1

Hey thanks for taking the time to test on earlier versions of Meteor. I'm happy with the version changes. Did you want to investigate async helpers?

dburles avatar Oct 15 '24 21:10 dburles

Ok great!

Yeah, I can try and take a look at some point and submit another PR. I’ve needed async helpers myself now with the recent meteor updates…

On Tue 15. Oct 2024 at 23:58, David Burles @.***> wrote:

Hey thanks for taking the time to test on earlier versions of Meteor. I'm happy with the version changes. Did you want to investigate async helpers?

— Reply to this email directly, view it on GitHub https://github.com/dburles/meteor-collection-helpers/pull/88#issuecomment-2415237506, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPHVFTK3QYMW7ZEJFZTZ3WFYVAVCNFSM6AAAAABPA7LCPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGIZTONJQGY . You are receiving this because you were mentioned.Message ID: @.***>

drone1 avatar Oct 15 '24 23:10 drone1

Great. I don't imagine it would require any changes to the source to support them. It's more a matter of including some tests for Meteor 3.

dburles avatar Oct 15 '24 23:10 dburles

Good point. Let me see what I can do.

On Wed, Oct 16, 2024 at 1:06 AM David Burles @.***> wrote:

Great. I don't imagine it would require any changes to the source to support them. It's more a matter of including some tests for Meteor 3.

— Reply to this email directly, view it on GitHub https://github.com/dburles/meteor-collection-helpers/pull/88#issuecomment-2415317336, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPG4CIRKSDIAF5VCMKDZ3WNYBAVCNFSM6AAAAABPA7LCPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVGMYTOMZTGY . You are receiving this because you were mentioned.Message ID: @.***>

drone1 avatar Oct 16 '24 20:10 drone1

Any news?

mcorbelli avatar Oct 28 '24 22:10 mcorbelli

Haven’t played with this yet. Are you waiting for these changes to accept the PR? For some reason I was under the impression we were talking about a secondary PR.

On Mon 28. Oct 2024 at 23:30, Mattia Corbelli @.***> wrote:

Any news?

— Reply to this email directly, view it on GitHub https://github.com/dburles/meteor-collection-helpers/pull/88#issuecomment-2442794857, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPHZPGWVUAEVQK5ZLA3Z52UHJAVCNFSM6AAAAABPA7LCPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBSG44TIOBVG4 . You are receiving this because you were mentioned.Message ID: @.***>

drone1 avatar Oct 29 '24 22:10 drone1

I don't have any idea on how Meteor 3 works with non async queries. Where you have commented out a test with a todo it would be good to add some async helpers.

dburles avatar Oct 30 '24 07:10 dburles

Ah sure, let me take a look…

On Wed 30. Oct 2024 at 08:49, David Burles @.***> wrote:

I don't have any idea on how Meteor 3 works with non async queries. Where you have commented out a test with a todo it would be good to add some async helpers.

— Reply to this email directly, view it on GitHub https://github.com/dburles/meteor-collection-helpers/pull/88#issuecomment-2446089524, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPBXTXZR5A72CLG3U63Z6CFPRAVCNFSM6AAAAABPA7LCPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBWGA4DSNJSGQ . You are receiving this because you were mentioned.Message ID: @.***>

drone1 avatar Oct 30 '24 11:10 drone1

Should be all good here.

drone1 avatar Nov 20 '24 23:11 drone1

Updated with some structural changes and pushed, but need more testing and changes, possibly. Bear with me please. Thanks.

drone1 avatar Nov 21 '24 02:11 drone1

@dburles I think we're good here. Please take a look when you can. Thanks.

drone1 avatar Nov 26 '24 17:11 drone1

Hey @drone1 thanks for all your effort on this. I would like to keep Tinytest in place since it retains the existing file structure and simplicity. I'm going to open a new PR and cherry pick some of your commits over there.

dburles avatar Nov 26 '24 20:11 dburles

Hey @drone1 see PR #89

dburles avatar Nov 26 '24 20:11 dburles

Hey @drone1 thanks for all your effort on this. I would like to keep Tinytest in place since it retains the existing file structure and simplicity. I'm going to open a new PR and cherry pick some of your commits over there.

tinytest does not play nice with async as I mentioned here – the test may run, but it's likely not actually testing much. You can look into it, but it's completely outdated and supports only one async call per test, IIRC, which is why I moved over to a more modern environment.

I understand the resistance to the structural changes, but it's what collection2 uses, and it works fine. Do you have a specific concern?

I put a lot more energy into this than I would have liked. It would be nice to not have it thrown away. It would also be nice to get the credit for the work. If there are specific concerns please let me know. Thanks a lot.

drone1 avatar Nov 26 '24 23:11 drone1

Hey Tinytest is okay with async tests, it just requires that you use Tinytest.addAsync. See: https://github.com/meteor/meteor/tree/devel/packages/tinytest#synchronous-and-asynchronous-tests. If Tinytest becomes deprecated in future Meteor releases it will make sense to migrate. The test requirements for this package are pretty simple. I understand that you would appreciate credit and the your work isn't being thrown away as I have kept the changes to the tests you made, as well as the readme updates. See: https://github.com/dburles/meteor-collection-helpers/pull/89/commits and https://github.com/dburles/meteor-collection-helpers/pull/89/commits/9085e8b695c2e73e896f7acbdd08aaac46882073 (I also tagged you in the commit for the test updates). I really do appreciate the time you have put into working on this!

dburles avatar Nov 27 '24 02:11 dburles

As an alternative, if you would like to make the commits yourself. I'm happy for you to open a new PR with the changes in #89 and I'll merge that. Let me know if you have issues running the Tinytest tests, but they look good on my side.

dburles avatar Nov 27 '24 20:11 dburles

it's okay, you can make the commits, but you might consider removing the dependency on underscore as well.

On Wed, Nov 27, 2024 at 9:36 PM David Burles @.***> wrote:

As an alternative, if you would like to make the commits yourself. I'm happy for you to open a new PR with the changes in #89 https://github.com/dburles/meteor-collection-helpers/pull/89 and I'll merge that. Let me know if you have issues running the Tinytest tests, but they look good on my side.

— Reply to this email directly, view it on GitHub https://github.com/dburles/meteor-collection-helpers/pull/88#issuecomment-2504730704, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPF4DOBH5N7UDV3T7GD2CYULXAVCNFSM6AAAAABPA7LCPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUG4ZTANZQGQ . You are receiving this because you were mentioned.Message ID: @.***>

drone1 avatar Dec 09 '24 18:12 drone1

Thanks @drone1. Yeah that's definitely a plan. I'm just not sure if it will break Meteor 1 and 2 support support if we switch to Object.keys/forEach and use Object spread etc.

dburles avatar Dec 09 '24 20:12 dburles

Published as 2.0.0! Thanks for all your effort @drone1 and @harryadel for the test workflow!

dburles avatar Dec 09 '24 21:12 dburles

OK great. Thanks

On Mon, Dec 9, 2024 at 10:03 PM David Burles @.***> wrote:

Published as 2.0.0! Thanks for all your effort @drone1 https://github.com/drone1 and @harryadel https://github.com/harryadel for the test workflow!

— Reply to this email directly, view it on GitHub https://github.com/dburles/meteor-collection-helpers/pull/88#issuecomment-2529441946, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPCVUS6TT2QOP424SUL2EYAS3AVCNFSM6AAAAABPA7LCPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRZGQ2DCOJUGY . You are receiving this because you were mentioned.Message ID: @.***>

drone1 avatar Dec 09 '24 21:12 drone1