-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Bump @nextcloud/router from 1.2.0 to 2.0.0 #27281
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
Bump @nextcloud/router from 1.2.0 to 2.0.0 #27281
Conversation
fd76d0a to
4a9dedb
Compare
4a9dedb to
f2939e9
Compare
f2939e9 to
2b2b0ac
Compare
2b2b0ac to
f0ed924
Compare
f0ed924 to
f2e0313
Compare
f2e0313 to
7cf6b93
Compare
7cf6b93 to
49efb90
Compare
49efb90 to
2783711
Compare
2783711 to
a3c3774
Compare
b189b7b to
9d43073
Compare
9d43073 to
317586c
Compare
317586c to
f02178f
Compare
f02178f to
26816a7
Compare
26816a7 to
107d5ee
Compare
107d5ee to
5c7f4c1
Compare
5c7f4c1 to
7bd4612
Compare
3054425 to
f25479f
Compare
f25479f to
d430021
Compare
d430021 to
8edcd9a
Compare
8edcd9a to
0078be5
Compare
0078be5 to
0caad4d
Compare
|
Dammit, compile bot denies to compile and amend, I guess due to the jsunit failure. But that failure is exactly a result of the missing compiled scripts 😄. Any idea how to resolve? I guess consequently using all compiled scripts from |
Bumps [@nextcloud/router](https://github.com/nextcloud/nextcloud-router) from 1.2.0 to 2.0.0. - [Release notes](https://github.com/nextcloud/nextcloud-router/releases) - [Changelog](https://github.com/nextcloud/nextcloud-router/blob/master/CHANGELOG.md) - [Commits](nextcloud-libraries/nextcloud-router@v1.2.0...v2.0.0) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
0caad4d to
6e5191b
Compare
Recompiled :) |
|
Drone reports some ... ah fixed in #28132, so not related. LGTM, had another review and local test of the code and tests don't run into any related anymore since a while. |
|
Thank you so much @MichaIng 🤗 🚀 |
| OC.Settings.Apps = OC.Settings.Apps || { | ||
| rebuildNavigation: function() { | ||
| $.getJSON(OC.linkToOCS('core/navigation', 2) + 'apps?format=json').done(function(response){ | ||
| $.getJSON(OC.linkToOCS('core/navigation/apps?format=json')).done(function(response){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is quite problematic.
It basically means our public api has been broken.
I would vote to revert the modifications of OC.linkToOCS calls from this PR and send the following patch instead:
diff --git a/core/src/OC/index.js b/core/src/OC/index.js
index c7d2ba2c33..ebf9171bad 100644
--- a/core/src/OC/index.js
+++ b/core/src/OC/index.js
@@ -286,9 +286,16 @@ export default {
*/
linkTo,
/**
+ * @param {String} service service name
+ * @param {Number} version OCS API version
+ * @returns {String} OCS API base path
* @deprecated 19.0.0 use `generateOcsUrl` from https://www.npmjs.com/package/@nextcloud/router
*/
- linkToOCS: generateOcsUrl,
+ linkToOCS: (service, version) => {
+ return generateOcsUrl(service, {}, {
+ ocsVersion: version || 1,
+ }) + '/'
+ },
/**
* @deprecated 19.0.0 use `generateRemoteUrl` from https://www.npmjs.com/package/@nextcloud/router
*/Would make sure compiled stuff is new and the old stuff is backwards compatible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand this has been deprecated in 19.0.0, so probably its better to remove it and place its calls with generateOcsUrl, going forward? I wanted to do that already, but wasn't sure where/how to load the API correctly.
Practically you mean calls by apps, right?
The second parameter for the version was always optional, so cannot be used to conditionally add the trailing slash, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand this has been deprecated in 19.0.0, so probably its better to remove it and place its calls with generateOcsUrl, going forward?
Yes, but our policy is to keep stuff longer around, so instead of breaking a deprecated method we will keep the old behaviour. New code should of course use the new method directly, but breaking the old public API is not a good idea.
The second parameter for the version was always optional, so cannot be used to conditionally add the trailing slash, right?
It is not used for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not used for that.
Yes I was just thinking that a simple solution to support both, old and new behaviour, is to add the trailing slash only when a valid version integer was passed as second argument, and else skip adding the slash. But this of course only works if the 2nd argument was mandatory before (and I just see, it wasn't), and it's probably a little fragile anyway.
Introduced with nextcloud/router v2.0.0 migration: #27281 Signed-off-by: MichaIng <micha@dietpi.com>
Introduced with nextcloud/router v2.0.0 migration: #27281 Signed-off-by: MichaIng <micha@dietpi.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Introduced with nextcloud/router v2.0.0 migration: #27281 Signed-off-by: MichaIng <micha@dietpi.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Introduced with nextcloud/router v2.0.0 migration: #27281 Signed-off-by: MichaIng <micha@dietpi.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Bumps @nextcloud/router from 1.2.0 to 2.0.0.
Changelog
Sourced from
@nextcloud/router's changelog.Commits
4c0b7a9v2.0.0b8fb765Merge pull request #213 from nextcloud/dependabot/npm_and_yarn/babel/cli-7.13.14a60cff6Merge pull request #212 from nextcloud/dependabot/npm_and_yarn/babel/core-7.1...fcbe75eMerge pull request #211 from nextcloud/dependabot/npm_and_yarn/core-js-3.10.0e8db5a5Bump@babel/clifrom 7.13.10 to 7.13.146ebcd05Bump@babel/corefrom 7.13.13 to 7.13.14e021512Bump core-js from 3.9.1 to 3.10.04eddff4Merge pull request #210 from nextcloud/feature/194/ocs-url-parameters7485bfcImprove documentation1996e60Allow to provide/inject URL parameters on OCS urls tooDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)