cozy-sharing 28.4.0 → 28.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [28.4.2](https://github.com/cozy/cozy-libs/compare/cozy-sharing@28.4.1...cozy-sharing@28.4.2) (2026-03-05)
7
+
8
+ **Note:** Version bump only for package cozy-sharing
9
+
10
+ ## [28.4.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@28.4.0...cozy-sharing@28.4.1) (2026-02-25)
11
+
12
+ **Note:** Version bump only for package cozy-sharing
13
+
6
14
  # [28.4.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@28.3.5...cozy-sharing@28.4.0) (2026-02-24)
7
15
 
8
16
  ### Features
@@ -3,7 +3,9 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { SynchronousJobQueue } from './synchronousJobQueue';
4
4
 
5
5
  var flushPromises = function flushPromises() {
6
- return new Promise(process.nextTick);
6
+ return new Promise(function (resolve) {
7
+ return jest.requireActual('timers').setImmediate(resolve);
8
+ });
7
9
  };
8
10
 
9
11
  var callback = jest.fn();
@@ -44,13 +46,15 @@ describe('SynchronousJobQueue', function () {
44
46
  });
45
47
  synchronousJobQueue.push({
46
48
  function: resolveAfter100Ms
47
- });
48
- jest.runAllTimers();
49
+ }); // Advance timers to let first job's setTimeout resolve
50
+
51
+ jest.advanceTimersByTime(500);
49
52
  _context.next = 6;
50
53
  return flushPromises();
51
54
 
52
55
  case 6:
53
- jest.runAllTimers();
56
+ // Advance timers to let second job's setTimeout resolve
57
+ jest.advanceTimersByTime(100);
54
58
  _context.next = 9;
55
59
  return flushPromises();
56
60
 
@@ -71,20 +75,15 @@ describe('SynchronousJobQueue', function () {
71
75
  case 0:
72
76
  resolveAfter500Ms();
73
77
  resolveAfter100Ms();
74
- jest.runAllTimers();
78
+ jest.advanceTimersByTime(600);
75
79
  _context2.next = 5;
76
80
  return flushPromises();
77
81
 
78
82
  case 5:
79
- jest.runAllTimers();
80
- _context2.next = 8;
81
- return flushPromises();
82
-
83
- case 8:
84
83
  expectedCallbackOrder = [['500Ms start'], ['100Ms start'], ['100Ms end'], ['500Ms end']];
85
84
  expect(callback.mock.calls).toEqual(expectedCallbackOrder);
86
85
 
87
- case 10:
86
+ case 7:
88
87
  case "end":
89
88
  return _context2.stop();
90
89
  }
package/jest.config.js CHANGED
@@ -11,6 +11,7 @@ module.exports = {
11
11
  '<rootDir>/__tests__/'
12
12
  ],
13
13
  roots: ['<rootDir>/src'],
14
+ testEnvironment: 'jsdom',
14
15
  testURL: 'http://localhost/',
15
16
  moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],
16
17
  moduleDirectories: ['src', 'node_modules'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "28.4.0",
3
+ "version": "28.4.2",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -30,8 +30,8 @@
30
30
  "dependencies": {
31
31
  "@cozy/minilog": "^1.0.0",
32
32
  "classnames": "^2.5.1",
33
- "cozy-device-helper": "^4.0.2",
34
- "cozy-doctypes": "^1.98.3",
33
+ "cozy-device-helper": "^4.0.3",
34
+ "cozy-doctypes": "^1.98.4",
35
35
  "date-fns": "2.30.0",
36
36
  "lodash": "^4.17.21",
37
37
  "react-autosuggest": "^10.1.0",
@@ -48,25 +48,25 @@
48
48
  "@storybook/react": "7.6.0",
49
49
  "@storybook/react-webpack5": "7.6.0",
50
50
  "@storybook/testing-library": "0.2.2",
51
- "@testing-library/jest-dom": "5.16.4",
52
- "@testing-library/react": "10.4.9",
51
+ "@testing-library/jest-dom": "5.17.0",
52
+ "@testing-library/react": "12.1.5",
53
53
  "@testing-library/react-hooks": "8.0.1",
54
- "babel-jest": "26.6.3",
54
+ "babel-jest": "27.5.1",
55
55
  "babel-plugin-css-modules-transform": "1.6.2",
56
56
  "babel-plugin-inline-react-svg": "1.1.2",
57
57
  "cozy-client": "^60.19.0",
58
58
  "cozy-device-helper": "^3.7.1",
59
- "cozy-intent": "^2.30.2",
59
+ "cozy-intent": "^2.30.3",
60
60
  "cozy-minilog": "^3.10.0",
61
61
  "cozy-ui": "^135.0.0",
62
- "cozy-ui-plus": "^5.0.0",
63
- "jest": "26.6.3",
64
- "jest-environment-jsdom": "26.6.2",
62
+ "cozy-ui-plus": "^5.1.1",
63
+ "jest": "27.5.1",
64
+ "jest-environment-jsdom": "27.5.1",
65
65
  "react": "16.12.0",
66
66
  "react-dom": "16.13.0",
67
67
  "react-router": "^5.0.1",
68
68
  "storybook": "7.6.0",
69
- "twake-i18n": "^0.3.1"
69
+ "twake-i18n": "^0.3.2"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "cozy-client": ">=60.19.0",
@@ -83,5 +83,5 @@
83
83
  "sideEffects": [
84
84
  "*.css"
85
85
  ],
86
- "gitHead": "b37748355413b0d3aac00988ec978687f0e607fe"
86
+ "gitHead": "46d6951cb22a17ac26c3b00c28caf47d405d6683"
87
87
  }
@@ -1,6 +1,7 @@
1
1
  import { SynchronousJobQueue } from './synchronousJobQueue'
2
2
 
3
- const flushPromises = () => new Promise(process.nextTick)
3
+ const flushPromises = () =>
4
+ new Promise(resolve => jest.requireActual('timers').setImmediate(resolve))
4
5
 
5
6
  const callback = jest.fn()
6
7
 
@@ -39,9 +40,11 @@ describe('SynchronousJobQueue', () => {
39
40
  synchronousJobQueue.push({ function: resolveAfter500Ms })
40
41
  synchronousJobQueue.push({ function: resolveAfter100Ms })
41
42
 
42
- jest.runAllTimers()
43
+ // Advance timers to let first job's setTimeout resolve
44
+ jest.advanceTimersByTime(500)
43
45
  await flushPromises()
44
- jest.runAllTimers()
46
+ // Advance timers to let second job's setTimeout resolve
47
+ jest.advanceTimersByTime(100)
45
48
  await flushPromises()
46
49
 
47
50
  const expectedCallbackOrder = [
@@ -58,9 +61,7 @@ describe('SynchronousJobQueue', () => {
58
61
  resolveAfter500Ms()
59
62
  resolveAfter100Ms()
60
63
 
61
- jest.runAllTimers()
62
- await flushPromises()
63
- jest.runAllTimers()
64
+ jest.advanceTimersByTime(600)
64
65
  await flushPromises()
65
66
 
66
67
  const expectedCallbackOrder = [