Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 29, 2021

Bumps @nextcloud/router from 1.2.0 to 2.0.0.

Changelog

Sourced from @​nextcloud/router's changelog.

2.0.0 - 2021-04-07

Changed

  • generateOcsUrl can now replace routing parameters like generateUrl
  • generateOcsUrl no longer contains a trailing slash unless given in the URL
  • Browserslist config updated, which means some older browsers are no longer supported
  • Dependency updates
Commits
  • 4c0b7a9 v2.0.0
  • b8fb765 Merge pull request #213 from nextcloud/dependabot/npm_and_yarn/babel/cli-7.13.14
  • a60cff6 Merge pull request #212 from nextcloud/dependabot/npm_and_yarn/babel/core-7.1...
  • fcbe75e Merge pull request #211 from nextcloud/dependabot/npm_and_yarn/core-js-3.10.0
  • e8db5a5 Bump @​babel/cli from 7.13.10 to 7.13.14
  • 6ebcd05 Bump @​babel/core from 7.13.13 to 7.13.14
  • e021512 Bump core-js from 3.9.1 to 3.10.0
  • 4eddff4 Merge pull request #210 from nextcloud/feature/194/ocs-url-parameters
  • 7485bfc Improve documentation
  • 1996e60 Allow to provide/inject URL parameters on OCS urls too
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot 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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from fd76d0a to 4a9dedb Compare May 31, 2021 08:38
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 4a9dedb to f2939e9 Compare June 7, 2021 21:36
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from f2939e9 to 2b2b0ac Compare June 8, 2021 21:20
@juliusknorr juliusknorr added this to the Nextcloud 23 milestone Jun 24, 2021
@npmbuildbot-nextcloud npmbuildbot-nextcloud bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 2b2b0ac to f0ed924 Compare July 9, 2021 13:31
@nextcloud nextcloud deleted a comment from dependabot bot Jul 9, 2021
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from f0ed924 to f2e0313 Compare July 9, 2021 13:37
@npmbuildbot-nextcloud npmbuildbot-nextcloud bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from f2e0313 to 7cf6b93 Compare July 9, 2021 14:02
@MichaIng MichaIng force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 7cf6b93 to 49efb90 Compare July 11, 2021 17:20
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 49efb90 to 2783711 Compare July 12, 2021 22:15
@npmbuildbot-nextcloud npmbuildbot-nextcloud bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 2783711 to a3c3774 Compare July 12, 2021 22:22
@MichaIng MichaIng force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch 2 times, most recently from b189b7b to 9d43073 Compare July 12, 2021 23:31
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 9d43073 to 317586c Compare July 13, 2021 23:46
@npmbuildbot-nextcloud npmbuildbot-nextcloud bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 317586c to f02178f Compare July 14, 2021 00:14
@MichaIng MichaIng force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from f02178f to 26816a7 Compare July 14, 2021 06:56
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 26816a7 to 107d5ee Compare July 15, 2021 09:35
@npmbuildbot-nextcloud npmbuildbot-nextcloud bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 107d5ee to 5c7f4c1 Compare July 15, 2021 12:39
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 5c7f4c1 to 7bd4612 Compare July 15, 2021 12:46
@MichaIng MichaIng force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 3054425 to f25479f Compare July 19, 2021 15:53
@npmbuildbot-nextcloud npmbuildbot-nextcloud bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from f25479f to d430021 Compare July 19, 2021 16:10
@nickvergessen nickvergessen removed their request for review July 19, 2021 17:23
@MichaIng MichaIng requested review from Pytal and juliusknorr July 19, 2021 18:03
@MichaIng MichaIng force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from d430021 to 8edcd9a Compare July 21, 2021 08:57
@npmbuildbot-nextcloud npmbuildbot-nextcloud bot force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 8edcd9a to 0078be5 Compare July 21, 2021 09:12
@MichaIng MichaIng force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 0078be5 to 0caad4d Compare July 23, 2021 13:21
@MichaIng
Copy link
Member

MichaIng commented Jul 23, 2021

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 master would solve it, so that the two URLs that are compared in the test do match again? I have no build environment here to compile those manually 🤔.

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>
@MichaIng MichaIng force-pushed the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch from 0caad4d to 6e5191b Compare July 23, 2021 13:57
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal
Copy link
Member

Pytal commented Jul 23, 2021

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 master would solve it, so that the two URLs that are compared in the test do match again? I have no build environment here to compile those manually 🤔.

Recompiled :)

@MichaIng
Copy link
Member

MichaIng commented Jul 24, 2021

Drone reports some /drone/src/apps/files_versions/tests/ test errors about to few arguments or type errors, only on the nodb check.
And indeed, here are config and time factory passed: https://github.com/nextcloud/server/blob/dependabot/npm_and_yarn/nextcloud/router-2.0.0/apps/files_versions/tests/ExpirationTest.php#L113
But here is additionally a logger expected: https://github.com/nextcloud/server/blob/dependabot/npm_and_yarn/nextcloud/router-2.0.0/apps/files_versions/lib/Expiration.php#L54

... 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.

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Jul 24, 2021
@skjnldsv skjnldsv merged commit a6d91c2 into master Jul 24, 2021
@skjnldsv skjnldsv deleted the dependabot/npm_and_yarn/nextcloud/router-2.0.0 branch July 24, 2021 11:11
@skjnldsv
Copy link
Member

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){
Copy link
Member

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

Copy link
Member

@MichaIng MichaIng Aug 19, 2021

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?

Copy link
Member

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.

Copy link
Member

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.

MichaIng added a commit that referenced this pull request Sep 24, 2021
Introduced with nextcloud/router v2.0.0 migration: #27281

Signed-off-by: MichaIng <micha@dietpi.com>
nextcloud-command pushed a commit that referenced this pull request Sep 24, 2021
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>
MichaIng added a commit that referenced this pull request Sep 26, 2021
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>
nextcloud-command pushed a commit that referenced this pull request Sep 26, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish feature: dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants