mirror of
https://github.com/zhigang1992/mobx-utils.git
synced 2026-01-12 17:32:29 +08:00
Add .gitattributes and git add . --renormalize
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
tab_width = 4
|
||||
|
||||
[{package.json}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
tab_width = 4
|
||||
|
||||
[{package.json}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
CHANGELOG.md coverage lib LICENSE mobx-utils.module.js mobx-utils.umd.js node_modules package.json publish.js README.md src test tsconfig.json yarn.lock text=auto eol=lf
|
||||
22
.gitignore
vendored
22
.gitignore
vendored
@@ -1,11 +1,11 @@
|
||||
node_modules
|
||||
*.log
|
||||
lib
|
||||
coverage
|
||||
mobx-utils.module.js
|
||||
mobx-utils.umd.js
|
||||
.idea
|
||||
/.test-ts/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
node_modules
|
||||
*.log
|
||||
lib
|
||||
coverage
|
||||
mobx-utils.module.js
|
||||
mobx-utils.umd.js
|
||||
.idea
|
||||
/.test-ts/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
14
.prettierrc
14
.prettierrc
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"semi": false,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": false,
|
||||
"useTabs": false
|
||||
}
|
||||
{
|
||||
"printWidth": 100,
|
||||
"semi": false,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": false,
|
||||
"useTabs": false
|
||||
}
|
||||
|
||||
24
.travis.yml
24
.travis.yml
@@ -1,12 +1,12 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 10
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
install:
|
||||
- yarn install
|
||||
script:
|
||||
- yarn run coverage
|
||||
after_success:
|
||||
- cat ./coverage/lcov.info|./node_modules/coveralls/bin/coveralls.js
|
||||
language: node_js
|
||||
node_js:
|
||||
- 10
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
install:
|
||||
- yarn install
|
||||
script:
|
||||
- yarn run coverage
|
||||
after_success:
|
||||
- cat ./coverage/lcov.info|./node_modules/coveralls/bin/coveralls.js
|
||||
|
||||
40
.vscode/launch.json
vendored
40
.vscode/launch.json
vendored
@@ -1,20 +1,20 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Jest Current File",
|
||||
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
|
||||
"args": ["--ci", "-i", "${fileBasenameNoExtension}"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"disableOptimisticBPs": true,
|
||||
"windows": {
|
||||
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
|
||||
},
|
||||
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js", "<node_internals>/**/*.js"],
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Jest Current File",
|
||||
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
|
||||
"args": ["--ci", "-i", "${fileBasenameNoExtension}"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"disableOptimisticBPs": true,
|
||||
"windows": {
|
||||
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
|
||||
},
|
||||
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js", "<node_internals>/**/*.js"],
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"typescript.tsdk": "./node_modules/typescript/lib"
|
||||
{
|
||||
"typescript.tsdk": "./node_modules/typescript/lib"
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
{}
|
||||
{}
|
||||
|
||||
42
LICENSE
42
LICENSE
@@ -1,21 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 MobX
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 MobX
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"version": "1.8.10",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"sourceMap": false,
|
||||
"declaration": true,
|
||||
"module": "es6",
|
||||
"removeComments": false,
|
||||
"outDir": "../lib/",
|
||||
"noImplicitAny": true,
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2015",
|
||||
"scripthost",
|
||||
"es2015.promise",
|
||||
"es2015.generator",
|
||||
"es2015.iterable"
|
||||
]
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
{
|
||||
"version": "1.8.10",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"sourceMap": false,
|
||||
"declaration": true,
|
||||
"module": "es6",
|
||||
"removeComments": false,
|
||||
"outDir": "../lib/",
|
||||
"noImplicitAny": true,
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2015",
|
||||
"scripthost",
|
||||
"es2015.promise",
|
||||
"es2015.generator",
|
||||
"es2015.iterable"
|
||||
]
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@@ -1,116 +1,116 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`it should support logging 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"arguments": Array [
|
||||
1,
|
||||
],
|
||||
"name": "f - runid 7 - step 0",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
2,
|
||||
],
|
||||
"name": "innerF - runid 8 - step 0",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 2,
|
||||
"oldValue": 1,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
2,
|
||||
],
|
||||
"name": "innerF - runid 8 - step 1",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 3,
|
||||
"oldValue": 2,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 4,
|
||||
"oldValue": 3,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
1,
|
||||
],
|
||||
"name": "f - runid 7 - step 1",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 5,
|
||||
"oldValue": 4,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
1,
|
||||
],
|
||||
"name": "f - runid 7 - step 2",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 3,
|
||||
"oldValue": 5,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
]
|
||||
`;
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`it should support logging 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"arguments": Array [
|
||||
1,
|
||||
],
|
||||
"name": "f - runid 7 - step 0",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
2,
|
||||
],
|
||||
"name": "innerF - runid 8 - step 0",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 2,
|
||||
"oldValue": 1,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
2,
|
||||
],
|
||||
"name": "innerF - runid 8 - step 1",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 3,
|
||||
"oldValue": 2,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 4,
|
||||
"oldValue": 3,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
1,
|
||||
],
|
||||
"name": "f - runid 7 - step 1",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 5,
|
||||
"oldValue": 4,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
1,
|
||||
],
|
||||
"name": "f - runid 7 - step 2",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@37",
|
||||
"newValue": 3,
|
||||
"oldValue": 5,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`it throws when index is out of bounds 1`] = `"[mobx.array] Index out of bounds: -1 is negative"`;
|
||||
|
||||
exports[`it throws when index is out of bounds 2`] = `"[mobx.array] Index out of bounds: 3 is not smaller than 3"`;
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`it throws when index is out of bounds 1`] = `"[mobx.array] Index out of bounds: -1 is negative"`;
|
||||
|
||||
exports[`it throws when index is out of bounds 2`] = `"[mobx.array] Index out of bounds: 3 is not smaller than 3"`;
|
||||
|
||||
@@ -1,94 +1,94 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`it should support logging 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"arguments": Array [
|
||||
2,
|
||||
],
|
||||
"name": "myaction - runid: 6 - init",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
undefined,
|
||||
],
|
||||
"name": "myaction - runid: 6 - yield 0",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 2,
|
||||
"oldValue": 1,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
5,
|
||||
],
|
||||
"name": "myaction - runid: 6 - yield 1",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 5,
|
||||
"oldValue": 2,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 4,
|
||||
"oldValue": 5,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
3,
|
||||
],
|
||||
"name": "myaction - runid: 6 - yield 2",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 3,
|
||||
"oldValue": 4,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
]
|
||||
`;
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`it should support logging 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"arguments": Array [
|
||||
2,
|
||||
],
|
||||
"name": "myaction - runid: 6 - init",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
undefined,
|
||||
],
|
||||
"name": "myaction - runid: 6 - yield 0",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 2,
|
||||
"oldValue": 1,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
5,
|
||||
],
|
||||
"name": "myaction - runid: 6 - yield 1",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 5,
|
||||
"oldValue": 2,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 4,
|
||||
"oldValue": 5,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"arguments": Array [
|
||||
3,
|
||||
],
|
||||
"name": "myaction - runid: 6 - yield 2",
|
||||
"spyReportStart": true,
|
||||
"type": "action",
|
||||
},
|
||||
Object {
|
||||
"key": "a",
|
||||
"name": "ObservableObject@10",
|
||||
"newValue": 3,
|
||||
"oldValue": 4,
|
||||
"spyReportStart": true,
|
||||
"type": "update",
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
Object {
|
||||
"spyReportEnd": true,
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`make sure the fn is cached 1`] = `
|
||||
Object {
|
||||
"dependencies": Array [
|
||||
Object {
|
||||
"name": "ObservableObject@10.m",
|
||||
},
|
||||
Object {
|
||||
"dependencies": Array [
|
||||
Object {
|
||||
"name": "ObservableObject@10.a",
|
||||
},
|
||||
Object {
|
||||
"name": "ObservableObject@10.b",
|
||||
},
|
||||
],
|
||||
"name": "computedFn(m#1)",
|
||||
},
|
||||
Object {
|
||||
"name": "ObservableObject@10.c",
|
||||
},
|
||||
],
|
||||
"name": "Autorun@11",
|
||||
}
|
||||
`;
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`make sure the fn is cached 1`] = `
|
||||
Object {
|
||||
"dependencies": Array [
|
||||
Object {
|
||||
"name": "ObservableObject@10.m",
|
||||
},
|
||||
Object {
|
||||
"dependencies": Array [
|
||||
Object {
|
||||
"name": "ObservableObject@10.a",
|
||||
},
|
||||
Object {
|
||||
"name": "ObservableObject@10.b",
|
||||
},
|
||||
],
|
||||
"name": "computedFn(m#1)",
|
||||
},
|
||||
Object {
|
||||
"name": "ObservableObject@10.c",
|
||||
},
|
||||
],
|
||||
"name": "Autorun@11",
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`should throw error when passed invalid param type 1`] = `"[mobx-utils] transform expected an object, function, string or number, got: null"`;
|
||||
|
||||
exports[`should throw error when passed invalid param type 2`] = `"[mobx-utils] transform expected an object, function, string or number, got: undefined"`;
|
||||
|
||||
exports[`should throw error when passed invalid param type 3`] = `"[mobx-utils] transform expected an object, function, string or number, got: Symbol(A)"`;
|
||||
|
||||
exports[`should throw error when passed invalid param type 4`] = `"[mobx-utils] transform expected an object, function, string or number, got: true"`;
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`should throw error when passed invalid param type 1`] = `"[mobx-utils] transform expected an object, function, string or number, got: null"`;
|
||||
|
||||
exports[`should throw error when passed invalid param type 2`] = `"[mobx-utils] transform expected an object, function, string or number, got: undefined"`;
|
||||
|
||||
exports[`should throw error when passed invalid param type 3`] = `"[mobx-utils] transform expected an object, function, string or number, got: Symbol(A)"`;
|
||||
|
||||
exports[`should throw error when passed invalid param type 4`] = `"[mobx-utils] transform expected an object, function, string or number, got: true"`;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`args length 2 1`] = `"Entry doesn't exist"`;
|
||||
|
||||
exports[`args length 2 2`] = `"Concurrent modification exception"`;
|
||||
|
||||
exports[`args length 2 3`] = `"DeepMap should be used with functions with a consistent length, expected: 2, got: 1"`;
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`args length 2 1`] = `"Entry doesn't exist"`;
|
||||
|
||||
exports[`args length 2 2`] = `"Concurrent modification exception"`;
|
||||
|
||||
exports[`args length 2 3`] = `"DeepMap should be used with functions with a consistent length, expected: 2, got: 1"`;
|
||||
|
||||
@@ -1,276 +1,276 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`add 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 3,
|
||||
"object": null,
|
||||
"type": "add",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`array 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"added": Array [
|
||||
Object {
|
||||
"x": 1,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
Object {
|
||||
"x": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
],
|
||||
"addedCount": 2,
|
||||
"index": 1,
|
||||
"object": null,
|
||||
"removed": Array [
|
||||
2,
|
||||
],
|
||||
"removedCount": 1,
|
||||
"type": "splice",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"1",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "a",
|
||||
"object": null,
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"2",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "b",
|
||||
"object": null,
|
||||
"oldValue": 2,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"3",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "c",
|
||||
"object": null,
|
||||
"oldValue": 3,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"added": Array [],
|
||||
"addedCount": 0,
|
||||
"index": 0,
|
||||
"object": null,
|
||||
"removed": Array [
|
||||
1,
|
||||
Object {
|
||||
"x": "a",
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
Object {
|
||||
"x": "b",
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
],
|
||||
"removedCount": 3,
|
||||
"type": "splice",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"added": Array [
|
||||
Object {
|
||||
"x": "B",
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
],
|
||||
"addedCount": 1,
|
||||
"index": 1,
|
||||
"object": null,
|
||||
"removed": Array [],
|
||||
"removedCount": 0,
|
||||
"type": "splice",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"0",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "A",
|
||||
"object": null,
|
||||
"oldValue": "c",
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`basic & dispose 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 2,
|
||||
"object": Object {
|
||||
"a": 2,
|
||||
"b": Object {
|
||||
"z": 3,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"b",
|
||||
Object {
|
||||
"name": "z",
|
||||
"newValue": 4,
|
||||
"object": Object {
|
||||
"z": 4,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": 3,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`cleanup 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"a",
|
||||
Object {
|
||||
"name": "b",
|
||||
"newValue": 2,
|
||||
"object": Object {
|
||||
"b": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "a",
|
||||
"object": Object {
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": Object {
|
||||
"b": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"type": "remove",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`deep 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"a/b",
|
||||
Object {
|
||||
"name": "c",
|
||||
"newValue": 4,
|
||||
"object": null,
|
||||
"oldValue": 3,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`delete 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "x",
|
||||
"object": null,
|
||||
"oldValue": 1,
|
||||
"type": "remove",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`map 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": Object {},
|
||||
"object": null,
|
||||
"type": "add",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": Object {
|
||||
"a": 1,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"object": null,
|
||||
"type": "add",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x/a",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 2,
|
||||
"object": null,
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 3,
|
||||
"object": null,
|
||||
"oldValue": Object {
|
||||
"a": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x",
|
||||
Object {
|
||||
"name": "a",
|
||||
"object": null,
|
||||
"oldValue": 3,
|
||||
"type": "delete",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`add 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 3,
|
||||
"object": null,
|
||||
"type": "add",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`array 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"added": Array [
|
||||
Object {
|
||||
"x": 1,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
Object {
|
||||
"x": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
],
|
||||
"addedCount": 2,
|
||||
"index": 1,
|
||||
"object": null,
|
||||
"removed": Array [
|
||||
2,
|
||||
],
|
||||
"removedCount": 1,
|
||||
"type": "splice",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"1",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "a",
|
||||
"object": null,
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"2",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "b",
|
||||
"object": null,
|
||||
"oldValue": 2,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"3",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "c",
|
||||
"object": null,
|
||||
"oldValue": 3,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"added": Array [],
|
||||
"addedCount": 0,
|
||||
"index": 0,
|
||||
"object": null,
|
||||
"removed": Array [
|
||||
1,
|
||||
Object {
|
||||
"x": "a",
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
Object {
|
||||
"x": "b",
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
],
|
||||
"removedCount": 3,
|
||||
"type": "splice",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"added": Array [
|
||||
Object {
|
||||
"x": "B",
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
],
|
||||
"addedCount": 1,
|
||||
"index": 1,
|
||||
"object": null,
|
||||
"removed": Array [],
|
||||
"removedCount": 0,
|
||||
"type": "splice",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"0",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": "A",
|
||||
"object": null,
|
||||
"oldValue": "c",
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`basic & dispose 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 2,
|
||||
"object": Object {
|
||||
"a": 2,
|
||||
"b": Object {
|
||||
"z": 3,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"b",
|
||||
Object {
|
||||
"name": "z",
|
||||
"newValue": 4,
|
||||
"object": Object {
|
||||
"z": 4,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": 3,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`cleanup 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"a",
|
||||
Object {
|
||||
"name": "b",
|
||||
"newValue": 2,
|
||||
"object": Object {
|
||||
"b": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "a",
|
||||
"object": Object {
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"oldValue": Object {
|
||||
"b": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"type": "remove",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`deep 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"a/b",
|
||||
Object {
|
||||
"name": "c",
|
||||
"newValue": 4,
|
||||
"object": null,
|
||||
"oldValue": 3,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`delete 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "x",
|
||||
"object": null,
|
||||
"oldValue": 1,
|
||||
"type": "remove",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`map 1`] = `
|
||||
Array [
|
||||
Array [
|
||||
"",
|
||||
Object {
|
||||
"name": "x",
|
||||
"newValue": Object {},
|
||||
"object": null,
|
||||
"type": "add",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": Object {
|
||||
"a": 1,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"object": null,
|
||||
"type": "add",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x/a",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 2,
|
||||
"object": null,
|
||||
"oldValue": 1,
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x",
|
||||
Object {
|
||||
"name": "a",
|
||||
"newValue": 3,
|
||||
"object": null,
|
||||
"oldValue": Object {
|
||||
"a": 2,
|
||||
Symbol(mobx administration): null,
|
||||
},
|
||||
"type": "update",
|
||||
},
|
||||
],
|
||||
Array [
|
||||
"x",
|
||||
Object {
|
||||
"name": "a",
|
||||
"object": null,
|
||||
"oldValue": 3,
|
||||
"type": "delete",
|
||||
},
|
||||
],
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"version": "1.8.10",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"downlevelIteration": true,
|
||||
"noEmit": true,
|
||||
"rootDir": ".",
|
||||
"lib": ["dom", "es2015", "scripthost"]
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["/node_modules"]
|
||||
}
|
||||
{
|
||||
"version": "1.8.10",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"downlevelIteration": true,
|
||||
"noEmit": true,
|
||||
"rootDir": ".",
|
||||
"lib": ["dom", "es2015", "scripthost"]
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["/node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user