Comments (5)
I like your proposal. Feels clear to expect similar and consistent interfaces for functions that are alike. I particularly prefer the approach of passing parameters as objects, which enhances versatility and facilitates quick refactoring if needed.
from meteor.
I suppose it should have backwards compatibility so people aren't forced to rewrite their existing code.
@nachocodoner any thoughts on whether it should be a breaking change or not? It would certainly be cleaner from a core code standpoint to make a breaking change but would require developers to make a small change in their code.
Also I think we'll want Meteor.passwordlessLoginWithTokenAnd2faCode
to be updated similarly to Meteor.loginWithPassword
as part of this issue.
Hey @abhinavtps, thanks for your willingness to jump on this one. Before diving into the solution, let's wait and see if the Meteor team thinks it's worth introducing a breaking change or not. The code will look quite a bit different depending on the answer to that question.
After we have a clearer picture of what's needed, the bulk of the work will need to happen here:
and here:
The js doc and .d.ts for these functions will need to be updated as well.
It will also need tests added / updated here: https://github.com/meteor/meteor/blob/devel/packages/accounts-password/password_tests.js to ensure the new proposed way works as expected.
from meteor.
I like that approach.
@abhinavtps see Nachoβs comment above for the desired solution. If you have follow up questions, feel free to use this thread. π
from meteor.
Hi @jamauro
This is my first open source, can you please guide me?
I see that updating the function definition of loginWithPassword in https://github.com/meteor/meteor/blob/devel/packages/meteor/meteor.d.ts with an object would suffice like below
function loginWithPassword(
user: { username?: string; email?: string; id?: string } | string,
password: string,
callback?: (error?: global_Error | Meteor.Error | Meteor.TypedError, result?: any) => void
): void;
I think it should not break any existing functionality, is this the expected fix?
from meteor.
any thoughts on whether it should be a breaking change or not? It would certainly be cleaner from a core code standpoint to make a breaking change but would require developers to make a small change in their code.
I propose avoiding breaking changes by implementing it with polymorphism, supporting both parameter and object approaches. We'll provide a deprecation log for the parameter approach, warning users about the convention change, to be removed in a future release. What are your thoughts?
from meteor.
Related Issues (20)
- Unable to create new meteor 3 projects HOT 4
- why am i getting this isses, please someone help. FormData { file name β {} } HOT 2
- Idle Crash in Development Mode
- Meteor 3 Migration Guide Feedback
- [Meteor 3] Tinytest major version increased HOT 2
- [Meteor 3] Environment Variables resets value too early HOT 2
- [Meteor 3] EnvironmentVariable.withValue has different return value on client and server
- [Meteor 3] SyntaxError: Unexpected token 'export' HOT 2
- bundle-visualizer not working with Meteor 3
- Login and CreateUser method send back the added message without fully fields HOT 2
- Meteor3 - MultiFileCachingCompiler does not set up its internal LRU cache correctly HOT 10
- Allow-deny package does not parse MongoServerError
- meteor/reify - changelog is not up to date HOT 1
- Method only runs once on server, simulation on client does run - 3.0-rc.0 HOT 4
- Firefox iOS is not marked as a modern brower HOT 5
- Meteor: 3.0.0-rc1 Package: allow-deny -> client side collection insert/update/remove not working as expected HOT 2
- I have a issue Cannot convert undefined or null to object TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at generateGridColumns (http://localhost:3000/main.e952596e505304fc7155.hot-update.js:41:30) HOT 2
- [Meteor 3] "meteor node" use the old node 14 instead of 20
- [Meteor 3] React regression: Warning: Invalid hook call. Hooks can only be called inside of the body of a function component.
- Missing Update for Meteor 3.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor.