@arrai-innovations/reactive-helpers 1.0.0
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/.circleci/config.yml +91 -0
- package/.commitlintrc.json +3 -0
- package/.editorconfig +5 -0
- package/.eslintignore +2 -0
- package/.eslintrc.js +26 -0
- package/.husky/commit-msg +2 -0
- package/.husky/pre-commit +2 -0
- package/.idea/encodings.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +8 -0
- package/.idea/reactive-helpers.iml +15 -0
- package/.lintstagedrc +11 -0
- package/.prettierignore +4 -0
- package/.prettierrc.js +5 -0
- package/README.md +598 -0
- package/babel.config.js +15 -0
- package/index.js +2 -0
- package/jest.config.mjs +27 -0
- package/package.json +59 -0
- package/tests/unit/.eslintrc.js +10 -0
- package/tests/unit/expectHelpers.js +6 -0
- package/tests/unit/mockOnUnmounted.js +9 -0
- package/tests/unit/use/index.spec.js +18 -0
- package/tests/unit/use/listFilter.spec.js +332 -0
- package/tests/unit/use/listInstance.spec.js +424 -0
- package/tests/unit/use/listRelated.spec.js +73 -0
- package/tests/unit/use/listSort.spec.js +220 -0
- package/tests/unit/use/listSubscription.spec.js +540 -0
- package/tests/unit/use/objectInstance.spec.js +897 -0
- package/tests/unit/use/objectSubscription.spec.js +671 -0
- package/tests/unit/use/search.spec.js +67 -0
- package/tests/unit/use/watches.spec.js +252 -0
- package/tests/unit/utils/assignReactiveObject.spec.js +127 -0
- package/tests/unit/utils/index.spec.js +18 -0
- package/tests/unit/utils/keyDiff.spec.js +67 -0
- package/tests/unit/utils/set.spec.js +68 -0
- package/tests/unit/utils/unrefAndToRawDeep.spec.js +170 -0
- package/use/index.js +8 -0
- package/use/listFilter.js +157 -0
- package/use/listInstance.js +144 -0
- package/use/listRelated.js +135 -0
- package/use/listSort.js +190 -0
- package/use/listSubscription.js +143 -0
- package/use/objectInstance.js +222 -0
- package/use/objectSubscription.js +188 -0
- package/use/search.js +104 -0
- package/utils/assignReactiveObject.js +62 -0
- package/utils/index.js +5 -0
- package/utils/keyDiff.js +10 -0
- package/utils/set.js +48 -0
- package/utils/unrefAndToRawDeep.js +49 -0
- package/utils/watches.js +170 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
orbs:
|
|
3
|
+
eslint: arrai/eslint@7.3.0
|
|
4
|
+
prettier: arrai/prettier@5.1.1
|
|
5
|
+
utils: arrai/utils@1.9.0
|
|
6
|
+
npm: arrai/npm@2.3.2
|
|
7
|
+
github: arrai/github@1.1.0
|
|
8
|
+
workflows:
|
|
9
|
+
test:
|
|
10
|
+
jobs:
|
|
11
|
+
- npm/coverage:
|
|
12
|
+
name: tests
|
|
13
|
+
context: arrai-global
|
|
14
|
+
filters:
|
|
15
|
+
branches:
|
|
16
|
+
only:
|
|
17
|
+
- main
|
|
18
|
+
- npm/coverage:
|
|
19
|
+
name: tests-no-badge
|
|
20
|
+
context: arrai-global
|
|
21
|
+
create_badges: false
|
|
22
|
+
filters:
|
|
23
|
+
tags:
|
|
24
|
+
only: /.*/
|
|
25
|
+
branches:
|
|
26
|
+
ignore:
|
|
27
|
+
- main
|
|
28
|
+
- npm/publish:
|
|
29
|
+
name: publish
|
|
30
|
+
context: arrai-private-package-publishing
|
|
31
|
+
requires:
|
|
32
|
+
- tests-no-badge
|
|
33
|
+
filters:
|
|
34
|
+
tags:
|
|
35
|
+
only: /.*/
|
|
36
|
+
branches:
|
|
37
|
+
ignore: /.*/
|
|
38
|
+
- github/create_release:
|
|
39
|
+
name: release_on_github
|
|
40
|
+
context: arrai-global
|
|
41
|
+
requires:
|
|
42
|
+
- tests-no-badge
|
|
43
|
+
filters:
|
|
44
|
+
tags:
|
|
45
|
+
only: /.*/
|
|
46
|
+
branches:
|
|
47
|
+
ignore: /.*/
|
|
48
|
+
lint:
|
|
49
|
+
jobs:
|
|
50
|
+
- eslint/eslint:
|
|
51
|
+
name: eslint
|
|
52
|
+
context: arrai-global
|
|
53
|
+
files: "."
|
|
54
|
+
wd: "."
|
|
55
|
+
config:
|
|
56
|
+
- run:
|
|
57
|
+
name: NPM
|
|
58
|
+
command: npm ci
|
|
59
|
+
filters:
|
|
60
|
+
branches:
|
|
61
|
+
only:
|
|
62
|
+
- main
|
|
63
|
+
- eslint/eslint:
|
|
64
|
+
name: eslint-no-badge
|
|
65
|
+
files: "."
|
|
66
|
+
wd: "."
|
|
67
|
+
config:
|
|
68
|
+
- run:
|
|
69
|
+
name: NPM
|
|
70
|
+
command: npm ci
|
|
71
|
+
create_badges: false
|
|
72
|
+
filters:
|
|
73
|
+
branches:
|
|
74
|
+
ignore:
|
|
75
|
+
- main
|
|
76
|
+
- prettier/code_style:
|
|
77
|
+
name: prettier
|
|
78
|
+
context: arrai-global
|
|
79
|
+
version: 2.6.2
|
|
80
|
+
filters:
|
|
81
|
+
branches:
|
|
82
|
+
only:
|
|
83
|
+
- main
|
|
84
|
+
- prettier/code_style:
|
|
85
|
+
name: prettier-no-badge
|
|
86
|
+
version: 2.6.2
|
|
87
|
+
create_badges: false
|
|
88
|
+
filters:
|
|
89
|
+
branches:
|
|
90
|
+
ignore:
|
|
91
|
+
- main
|
package/.editorconfig
ADDED
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
|
|
4
|
+
env: {
|
|
5
|
+
node: true,
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
extends: ["plugin:vue/vue3-essential", "eslint:recommended", "@vue/prettier"],
|
|
9
|
+
|
|
10
|
+
parserOptions: {
|
|
11
|
+
parser: "babel-eslint",
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
rules: {
|
|
15
|
+
"no-console": "off", // console.error is useful.
|
|
16
|
+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
|
|
17
|
+
"space-before-function-paren": [
|
|
18
|
+
"error",
|
|
19
|
+
{
|
|
20
|
+
anonymous: "always",
|
|
21
|
+
named: "never",
|
|
22
|
+
asyncArrow: "always",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/reactive-helpers.iml" filepath="$PROJECT_DIR$/.idea/reactive-helpers.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="PrettierConfiguration">
|
|
4
|
+
<option name="myRunOnSave" value="true" />
|
|
5
|
+
<option name="myRunOnReformat" value="true" />
|
|
6
|
+
<option name="myFilesPattern" value="{**/*,*}.{js,ts,jsx,tsx,less,scss,css,vue,markdown,md,json,yml,yaml,html}" />
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
8
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
9
|
+
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
|
10
|
+
<excludeFolder url="file://$MODULE_DIR$/coverage" />
|
|
11
|
+
</content>
|
|
12
|
+
<orderEntry type="inheritedJdk" />
|
|
13
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
14
|
+
</component>
|
|
15
|
+
</module>
|
package/.lintstagedrc
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"**/*.{js,cjs,mjs,ts,jsx,tsx}": [
|
|
3
|
+
"npx --no-install eslint --fix"
|
|
4
|
+
],
|
|
5
|
+
"**/*.{markdown,md}": [
|
|
6
|
+
"npx --no-install doctoc --github -u ."
|
|
7
|
+
],
|
|
8
|
+
"**/*.{js,cjs,mjs,ts,jsx,tsx,less,scss,css,vue,markdown,json,md,yml,yaml,html}": [
|
|
9
|
+
"npx --no-install prettier --write"
|
|
10
|
+
]
|
|
11
|
+
}
|
package/.prettierignore
ADDED