-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
2.0 #276
Merged
Merged
2.0 #276
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Move DataModel remoting setup into setup phase - Add a remoting type converter for DataModels - Move model tests into re-usable test utilities - Move other test utilities into new test utilities folder
Conflicts: test/access-token.test.js
Rename `loopback.getModel` to `loopback.findModel`. Implement `loopback.getModel` as a wrapper around `findModel` that throws an error when the model as not found.
…-found [2.0] Make getModel throw when not found
[2.0] Fix remote method definition in client-server example
Modify `app.boot` to throw an exception, pointing users to the new module `loopback-boot`.
Signed-off-by: Laurent Chenay <[email protected]>
[2.0] Remove `app.boot`
Allow peer to use beta2 of datasource-juggler (and future)
- Move configuration of Karma unit-tests from `Gruntfile.js` to a standalone file (`test/karma.conf.js`). - Add a new Grunt task `karma:unit-ci` to run Karma unit-tests in PhantomJS and produce karma-xunit.xml file that can be consumed by the CI server. - Add grunt-mocha-test, configure it to run unit-tests. - Add `grunt test` task that runs both karma and mocha tests, detects Jenkins to produce XML output on CI server. - Modify the `test` script in `package.json` to run `grunt mocha-and-karma` (an alias for `grunt test`). The alias is required to trick `sl-ci-run` to run `npm test` instead of calling directly `mocha`. - Add `es5-shim` module to karma unit-tests in order to provide ES5-methods required by LoopBack. - Fix `mixin(source)` in lib/loopback.js to work in PhantomJS. `Object.getOwnPropertyDescriptor()` provided by `es5-shim` does not work in the same way as in Node.
[2.0] Fix loopback in PhantomJS, fix karma tests
Conflicts: package.json
Land the pull request #357 > app: update `url` on `listening` event
Fix the query in `Checkpoint.current()` to correctly specify sorting `seq DESC`. Before this change, the first checkpoint was returned as the current one.
[2.0] checkpoint: fix `current()`
When a public model is added to an application and the model has change tracking enabled, its Change model is added to the public models. Before this change, conflict resolution in the browser was not working, because it was not possible to fetch the remote change.
[2.0] Fix conflict resolution
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/to @raymondfeng @bajtos @crandmck
#2.0 TODO
Model
)loopback.createModel()
in favor ofModel.extend()
.DataModel
toPersistedModel
DataModel
mixins in favor of simple delegationDataModel
methods should delegate to the dataSource directlyDataModel#replicate()
intoReplication
class.DataModel#bulkUpdate()
intoBulkUpdate
class.DataModel#diff()
intoDiff
class.Model
autoAttachapp.remoteObjects()
ACL
=>AccessControl
andoptions.acls
tooptions.acl
.sharedCtor
and remoted prototype methodsDataModel
methodsapp.boot()
into its own separate moduleACL
into its own separate moduleBreaking Changes
See https://github.com/strongloop/loopback/blob/1.9/CHANGES.md for my notes on breaking changes.
Should we mark these in the docs as deprecated?
Model => DataModel
Model
is now specifically for defining data structures.DataModel
is the default class forapp.model(name, ...);
andmodels.json
.Remote Methods
Remote methods no longer rely on function objects for storing meta-data. This means remoting meta-data is simple to (de)serialize. All metadata has been moved from juggler to loopback including the relations.
Types
Remote methods now define the concrete type for accepts / returns. This is required to correctly serialize models when code expects the concrete type (eg.
MyModel
) in a callback. This is to allow code like the following to work anywhere (client, server, browser, etc)Replication
This has been mostly reviewed as part of #153. End to end tests should be review and glaring issues preventing releasing 1.9.0. Minor issues can be resolved in 1.9.x.
The e2e tests could be improved quite a bit. Suggestions welcome there.
Remote Connector
This has been reworked a little, could use some second eyes. Same story here, anything major should be fixed before we release 1.9.0. Minor changes can be saved 1.9.x.
Isomorphic LoopBack
This feature was landed a while ago, overall testing strategy could use some eyes. Changes suggested here will most likely wait for 1.9.1.