Skip to content

optional determinisic sort order #465

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

Merged
merged 2 commits into from
Jul 28, 2025

Conversation

lynchem
Copy link
Collaborator

@lynchem lynchem commented Apr 11, 2025

(summary by copilot)
This pull request introduces several changes to improve deterministic sorting and update code style for consistency. The most important changes include adding a deterministic sort option, updating the lockfile version, and improving code readability by standardizing the use of parentheses and spacing.

Improvements to deterministic sorting:

  • common/Tabular.js: Added ensureDeterministicSort option to Tabular.Table class to support deterministic sorting. [1] [2]
  • common/util.js: Updated getMongoSort function to include _id as a tie-breaker for deterministic sorting when the deterministic parameter is true. [1] [2]
  • client/main.js: Modified Template.tabular.onRendered to use the ensureDeterministicSort option when updating the sort.

Code style updates:

  • client/main.js: Standardized the use of parentheses and spacing in the Template.tabular.onRendered and Template.tabular.onDestroyed functions. [1] [2]
  • tests/util.js: Updated test cases to use consistent variable declarations and formatting. [1] [2]

Other changes:

@jankapunkt jankapunkt requested a review from Copilot April 11, 2025 17:12
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • .npm/package/npm-shrinkwrap.json: Language not supported

@lynchem
Copy link
Collaborator Author

lynchem commented Jul 21, 2025

This is the one I'd love you to take a look at @jankapunkt. If you think it's good and we can publish a version for meteor 2.x I can test it out. Not sure what the best way it to handle 2.x and 3.x versions.

@jankapunkt
Copy link
Member

@lynchem I think we are good with a 2.x branch that will not interfere with master and 3.x changes. I know this increases efforts but its a clean and non breaking way. If you think this feature is also necessary in 3.x then I suggest to create a separate PR (with same/similar code) against the migration/3.0 branch.

@lynchem lynchem merged commit b6ebdac into Meteor-Community-Packages:meteor-2.x Jul 28, 2025
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.

2 participants