mobx 6.15.0 → 6.15.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobx",
3
- "version": "6.15.0",
3
+ "version": "6.15.2",
4
4
  "description": "Simple, scalable state management.",
5
5
  "source": "src/mobx.ts",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "sideEffects": false,
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "https://github.com/mobxjs/mobx.git"
25
+ "url": "git+https://github.com/mobxjs/mobx.git"
26
26
  },
27
27
  "author": "Michel Weststrate",
28
28
  "license": "MIT",
@@ -61,10 +61,10 @@
61
61
  "data flow"
62
62
  ],
63
63
  "scripts": {
64
- "test": "jest",
64
+ "test": "jest --config jest.projects.js",
65
65
  "lint": "eslint src/**/*",
66
66
  "build": "node ../../scripts/build.js mobx",
67
- "build:test": "yarn build --target test",
67
+ "build:test": "npm run build -- --target test",
68
68
  "perf": "scripts/perf.sh",
69
69
  "perf-legacy": "node --expose-gc ./__tests__/perf/index.js legacy",
70
70
  "perf-proxy": "node --expose-gc ./__tests__/perf/index.js proxy",
@@ -75,6 +75,6 @@
75
75
  "test:coverage": "yarn test -i --coverage",
76
76
  "test:size": "yarn import-size --report . observable computed autorun action",
77
77
  "test:check": "yarn test:types",
78
- "prepublishOnly": "node ./scripts/prepublish.js && yarn build --target publish"
78
+ "prepublishOnly": "node ./scripts/prepublish.js && npm run build -- --target publish"
79
79
  }
80
80
  }
package/src/api/flow.ts CHANGED
@@ -17,10 +17,17 @@ export const FLOW = "flow"
17
17
 
18
18
  let generatorId = 0
19
19
 
20
- export function FlowCancellationError() {
21
- this.message = "FLOW_CANCELLED"
20
+ export class FlowCancellationError extends Error {
21
+ constructor() {
22
+ super("FLOW_CANCELLED")
23
+ Object.setPrototypeOf(this, new.target.prototype)
24
+ this.name = "FlowCancellationError"
25
+ }
26
+
27
+ toString() {
28
+ return `Error: ${this.message}`
29
+ }
22
30
  }
23
- FlowCancellationError.prototype = Object.create(Error.prototype)
24
31
 
25
32
  export function isFlowCancellationError(error: Error) {
26
33
  return error instanceof FlowCancellationError
package/src/mobx.ts CHANGED
@@ -108,6 +108,7 @@ export {
108
108
  flow,
109
109
  isFlow,
110
110
  flowResult,
111
+ CancellablePromise,
111
112
  FlowCancellationError,
112
113
  isFlowCancellationError,
113
114
  toJS,