pane-registry 2.5.1 → 3.0.0-73e88b3
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/README.md +44 -0
- package/package.json +24 -25
- package/eslint.config.mjs +0 -22
- /package/{index.d.ts → src/index.d.ts} +0 -0
- /package/{paneRegistry.js → src/paneRegistry.js} +0 -0
package/README.md
CHANGED
|
@@ -5,3 +5,47 @@ An index to hold all loaded solid panes, whether statically or dynamically loade
|
|
|
5
5
|
# Adendum
|
|
6
6
|
|
|
7
7
|
The pane registry is a crucial part of the Solid Panes system. It is where any pane inserts itself or is inserted. In the standard working of SolidOS, there is one place in solid-panes where all the normal panes are loaded into the pane registry (see: [registerPanes.js](https://github.com/solidos/solid-panes/blob/main/src/registerPanes.js) in solid-panes). But other apps, and especially developers developing new panes can insert their own panes. And so we hope we will end up with panes dynamically laoded according to user configuration preferences.
|
|
8
|
+
|
|
9
|
+
# Testing Guide
|
|
10
|
+
|
|
11
|
+
## Running Tests
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Run all tests
|
|
15
|
+
npm test
|
|
16
|
+
|
|
17
|
+
# Run all tests with coverages
|
|
18
|
+
npm test-coverage
|
|
19
|
+
|
|
20
|
+
# Run tests in watch mode
|
|
21
|
+
npm run test-watch
|
|
22
|
+
|
|
23
|
+
# Run linting only
|
|
24
|
+
npm run lint
|
|
25
|
+
|
|
26
|
+
# Auto-fix linting issues
|
|
27
|
+
npm run lint-fix
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Test Coverage
|
|
31
|
+
|
|
32
|
+
The tests provide 100% code coverage for all functionality:
|
|
33
|
+
|
|
34
|
+
- **Initial State Tests**: Verify registry starts empty
|
|
35
|
+
- **Registration Tests**: Test pane registration with various scenarios
|
|
36
|
+
- **Lookup Tests**: Test finding panes by name
|
|
37
|
+
- **Integration Tests**: Complex workflows and edge cases
|
|
38
|
+
|
|
39
|
+
## Test Structure
|
|
40
|
+
|
|
41
|
+
- `test/paneRegistry.test.js` - Main test suite
|
|
42
|
+
- Tests use Jest framework with comprehensive mocking
|
|
43
|
+
- Console output is mocked to avoid noise during testing
|
|
44
|
+
- State is reset between tests for isolation
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Coverage Report
|
|
48
|
+
|
|
49
|
+
After running tests, view the coverage report:
|
|
50
|
+
- Text summary in console
|
|
51
|
+
- HTML report in `coverage/` directory
|
package/package.json
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pane-registry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-73e88b3",
|
|
4
4
|
"description": "Solid-compatible Panes: Pane Registry",
|
|
5
|
-
"main": "
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "src/paneRegistry.js",
|
|
6
|
+
"types": "src/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"src/",
|
|
9
|
+
"README.md",
|
|
10
|
+
"LICENSE"
|
|
11
|
+
],
|
|
7
12
|
"scripts": {
|
|
8
13
|
"build": "echo nothing to build",
|
|
9
|
-
"lint": "eslint
|
|
10
|
-
"lint-fix": "eslint
|
|
11
|
-
"test": "
|
|
12
|
-
"
|
|
14
|
+
"lint": "eslint",
|
|
15
|
+
"lint-fix": "eslint --fix",
|
|
16
|
+
"test": "jest --no-coverage",
|
|
17
|
+
"test-coverage": "jest --coverage",
|
|
18
|
+
"test-watch": "jest --watch",
|
|
19
|
+
"ignore:prepublishOnly": "npm run lint && npm test",
|
|
20
|
+
"preversion": "npm run lint && npm run test",
|
|
13
21
|
"postversion": "git push origin main --follow-tags"
|
|
14
22
|
},
|
|
15
23
|
"repository": {
|
|
16
24
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/solidos/pane-registry"
|
|
25
|
+
"url": "git+https://github.com/solidos/pane-registry.git"
|
|
18
26
|
},
|
|
19
27
|
"keywords": [
|
|
20
28
|
"solid",
|
|
@@ -36,25 +44,16 @@
|
|
|
36
44
|
"url": "https://github.com/solidos/chat-pane/issues"
|
|
37
45
|
},
|
|
38
46
|
"homepage": "https://github.com/solidos/chat-pane",
|
|
39
|
-
"
|
|
40
|
-
"rdflib": "^2.
|
|
41
|
-
"solid-logic": "^
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"rdflib": "^2.3.0",
|
|
49
|
+
"solid-logic": "^4.0.0"
|
|
42
50
|
},
|
|
43
51
|
"devDependencies": {
|
|
44
52
|
"eslint": "^9.32.0",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"neostandard": "^0.12.2"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"hooks": {
|
|
51
|
-
"pre-commit": "lint-staged",
|
|
52
|
-
"pre-push": "npm test"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"lint-staged": {
|
|
56
|
-
"*.js": [
|
|
57
|
-
"eslint"
|
|
58
|
-
]
|
|
53
|
+
"globals": "^16.5.0",
|
|
54
|
+
"jest": "^29.7.0",
|
|
55
|
+
"neostandard": "^0.12.2",
|
|
56
|
+
"rdflib": "^2.3.0",
|
|
57
|
+
"solid-logic": "^4.0.0"
|
|
59
58
|
}
|
|
60
59
|
}
|
package/eslint.config.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import globals from 'globals'
|
|
2
|
-
import neostandard from 'neostandard'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default [
|
|
6
|
-
...neostandard(),
|
|
7
|
-
{
|
|
8
|
-
languageOptions: {
|
|
9
|
-
globals: {
|
|
10
|
-
...globals.browser,
|
|
11
|
-
...globals.node
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
rules: {
|
|
16
|
-
'no-unused-vars': ['warn', {
|
|
17
|
-
argsIgnorePattern: '^_',
|
|
18
|
-
varsIgnorePattern: '^_'
|
|
19
|
-
}]
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
]
|
|
File without changes
|
|
File without changes
|