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

fixes package for Meteor 2.3 and Meteor 3.0 #88

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

drone1
Copy link

@drone1 drone1 commented Sep 28, 2024

passes all tests for meteor 1.12.1, 2.3, 3.0.3

package.js Outdated
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']);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @drone1 just wondering why the minimum version bump here is required?

Copy link
Author

@drone1 drone1 Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, actually it looks like you're referring to the package minimum version bump but you replied on this line about minimum Meteor versions?

If so, I bumped the package version since there is an update? Sorry I'm not understanding the question. Thank you.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the specific trouble you were having running the current version of the package on Meteor 3? It works okay for me.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant here is that you have dropped support for Meteor versions between 1.4.2 and 1.12.1 and I was wondering if there was any specific reason for that?

Copy link
Author

@drone1 drone1 Oct 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the specific trouble you were having running the current version of the package on Meteor 3? It works okay for me.

Helpers were not present on a client collection on document retrieved with findOne(). If I used collection._transform() the helpers appeared again as expected.

Once I changed the api.versionFrom line everything worked again from what I recall, but let me confirm and get back here with details.

What I meant here is that you have dropped support for Meteor versions between 1.4.2 and 1.12.1 and I was wondering if there was any specific reason for that?

This was totally copy-pasta :( Will fix. Thanks.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce the problem you mention, maybe something else is going on?

@drone1
Copy link
Author

drone1 commented Sep 30, 2024 via email

@drone1
Copy link
Author

drone1 commented Oct 15, 2024

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.

…om()` version (in dburles:[email protected]) of 1.4.2 with 1.12.1. this change corrects this (back to 1.4.2) but also retains the fix for meteor 3, which passes 3 versions rather than just a single version, and includes 2.3 and 3.0.

Tests are passing for Meteor 2.3 and 3.0, using commands:

```
  meteor test-packages ./packages/collection-helpers --release 2.3
  meteor test-packages ./packages/collection-helpers --release 3.0
```

Meteor 1.4.2 is spewing some errors about a failure to "get
local issuer certificate" (macOS Sonoma 14.5), but I wanted to push this
commit in case author @dburles wants to try and test.
@drone1
Copy link
Author

drone1 commented Oct 15, 2024

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.

@dburles
Copy link
Owner

dburles commented Oct 15, 2024

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?

@drone1
Copy link
Author

drone1 commented Oct 15, 2024 via email

@dburles
Copy link
Owner

dburles commented Oct 15, 2024

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.

@drone1
Copy link
Author

drone1 commented Oct 16, 2024 via email

@mcorbelli
Copy link

Any news?

@drone1
Copy link
Author

drone1 commented Oct 29, 2024 via email

@dburles
Copy link
Owner

dburles commented Oct 30, 2024

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.

@drone1
Copy link
Author

drone1 commented Oct 30, 2024 via email

@drone1
Copy link
Author

drone1 commented Nov 4, 2024

Can't seem to get tests running on the server, despite a variety of attempts. Do you have any experience with this? I ended up posting on the Meteor forums but haven't heard anything yet. If you've got a tip, please let me know!

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

Successfully merging this pull request may close these issues.

3 participants