memorio 4.3.5 → 4.5.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/README.md +10 -4
- package/SUMMARY.md +2 -1
- package/index.cjs +153 -124
- package/index.js +153 -124
- package/markdown/CHANGELOG.md +1 -1
- package/markdown/DISPATCH.md +168 -0
- package/markdown/OBSERVER.md +33 -13
- package/markdown/USEOBSERVER.md +112 -13
- package/package.json +1 -1
- package/types/memorio.d.ts +3 -0
- package/types/store.d.ts +1 -1
- package/CODE_OF_CONDUCT.md +0 -108
- package/CONTRIBUTING.md +0 -105
- package/COPYRIGHT.md +0 -6
- package/LICENSE.md +0 -21
- package/SECURITY.md +0 -48
- package/llms.txt +0 -405
package/markdown/CHANGELOG.md
CHANGED
|
@@ -56,7 +56,7 @@ All notable changes to this project will be documented in this file.
|
|
|
56
56
|
|
|
57
57
|
### 📝 Documentation Updates
|
|
58
58
|
|
|
59
|
-
- `docs/README.md`: replaced `console.
|
|
59
|
+
- `docs/README.md`: replaced `console.debug` with `console.debug` in usage examples; fixed `esbuild` badge → `tsup`
|
|
60
60
|
- `.github/CHANGELOG.md`: restructured with fix / security / changed sections
|
|
61
61
|
- `.github/HISTORY.md`: complete rewrite through v3.0.2
|
|
62
62
|
- `.github/SECURITY.md`: NIST/NSA standard + OWASP Top 10 mapping
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Dispatch - Memorio
|
|
2
|
+
|
|
3
|
+
> ⚛️ **Vanilla JS**: This is for non-React applications. For React, use [`useObserver`](USEOBSERVER.md).
|
|
4
|
+
|
|
5
|
+
`memorio.dispatch` is an event system for vanilla JavaScript applications. It enables pub/sub patterns without React hooks.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install memorio
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
import 'memorio';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Quick Examples
|
|
20
|
+
|
|
21
|
+
### Example 1: Basic Event Listening
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
// Listen for an event
|
|
25
|
+
memorio.dispatch.listen('my:event', (event) => {
|
|
26
|
+
console.debug('Event triggered:', event.detail);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Trigger the event
|
|
30
|
+
memorio.dispatch.set('my:event', { detail: { data: 'Hello World' } });
|
|
31
|
+
// Output: "Event triggered: { data: 'Hello World' }"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Example 2: State Reactivity (Vanilla JS)
|
|
35
|
+
|
|
36
|
+
```javascript
|
|
37
|
+
// React to state changes without React
|
|
38
|
+
memorio.dispatch.listen('state.counter', (event) => {
|
|
39
|
+
console.debug('Counter is now:', event.detail);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// Update state
|
|
43
|
+
state.counter = 1;
|
|
44
|
+
// Output: "Counter is now: 1"
|
|
45
|
+
|
|
46
|
+
state.counter = 5;
|
|
47
|
+
// Output: "Counter is now: 5"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Example 3: Remove Listener
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
// Remove a specific event listener
|
|
54
|
+
memorio.dispatch.remove('my:event');
|
|
55
|
+
|
|
56
|
+
// Or remove all listeners for state changes
|
|
57
|
+
memorio.dispatch.remove('state.user');
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## API Reference
|
|
63
|
+
|
|
64
|
+
### memorio.dispatch.set(name, value)
|
|
65
|
+
|
|
66
|
+
Dispatches a custom event with the specified name and value.
|
|
67
|
+
|
|
68
|
+
| Parameter | Type | Description |
|
|
69
|
+
|-----------|------|-------------|
|
|
70
|
+
| `name` | `string` | Event name (e.g., `'my:event'`, `'state.counter'`) |
|
|
71
|
+
| `value` | `object` | Object with `detail` property (default: `{}`) |
|
|
72
|
+
|
|
73
|
+
```javascript
|
|
74
|
+
memorio.dispatch.set('custom:event', { detail: { data: 'value' } });
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### memorio.dispatch.listen(name, callback)
|
|
78
|
+
|
|
79
|
+
Listens for the specified event and executes the callback when triggered.
|
|
80
|
+
|
|
81
|
+
| Parameter | Type | Description |
|
|
82
|
+
|-----------|------|-------------|
|
|
83
|
+
| `name` | `string` | Event name to listen for |
|
|
84
|
+
| `callback` | `function` | Function called with the event object |
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
memorio.dispatch.listen('state.user', (event) => {
|
|
88
|
+
console.debug('User changed:', event.detail);
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### memorio.dispatch.remove(name)
|
|
93
|
+
|
|
94
|
+
Removes the event listener for the specified event name.
|
|
95
|
+
|
|
96
|
+
| Parameter | Type | Description |
|
|
97
|
+
|-----------|------|-------------|
|
|
98
|
+
| `name` | `string` | Event name to stop listening |
|
|
99
|
+
|
|
100
|
+
```javascript
|
|
101
|
+
memorio.dispatch.remove('state.counter');
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Common Patterns
|
|
107
|
+
|
|
108
|
+
### Form Validation
|
|
109
|
+
|
|
110
|
+
```javascript
|
|
111
|
+
memorio.dispatch.listen('state.form.email', (event) => {
|
|
112
|
+
const email = event.detail;
|
|
113
|
+
const isValid = email.includes('@');
|
|
114
|
+
state.form.isValid = isValid;
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Analytics Tracking
|
|
119
|
+
|
|
120
|
+
```javascript
|
|
121
|
+
memorio.dispatch.listen('state.page', (event) => {
|
|
122
|
+
const page = event.detail;
|
|
123
|
+
analytics.track('page_view', { page });
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Auto-save
|
|
128
|
+
|
|
129
|
+
```javascript
|
|
130
|
+
memorio.dispatch.listen('state.draft', (event) => {
|
|
131
|
+
const content = event.detail;
|
|
132
|
+
store.set('autosave', content);
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Multiple Listeners
|
|
137
|
+
|
|
138
|
+
```javascript
|
|
139
|
+
// Listen for multiple state changes
|
|
140
|
+
memorio.dispatch.listen('state.user', (e) => console.log('User:', e.detail));
|
|
141
|
+
memorio.dispatch.listen('state.settings', (e) => console.log('Settings:', e.detail));
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Migration from observer()
|
|
147
|
+
|
|
148
|
+
The `observer()` Replace it with `memorio.dispatch.listen()`:
|
|
149
|
+
|
|
150
|
+
```javascript
|
|
151
|
+
observer('state.counter', (newValue) => {
|
|
152
|
+
console.debug('Counter:', newValue);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// NEW (recommended for vanilla JS)
|
|
156
|
+
memorio.dispatch.listen('state.counter', (event) => {
|
|
157
|
+
console.debug('Counter:', event.detail);
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Best Practices
|
|
164
|
+
|
|
165
|
+
1. Use specific event names: `'state.user.name'` not `'state'`
|
|
166
|
+
2. Clean up listeners when no longer needed with `memorio.dispatch.remove()`
|
|
167
|
+
3. Use `event.detail` to access the value
|
|
168
|
+
4. For React applications, use [`useObserver`](USEOBSERVER.md) instead
|
package/markdown/OBSERVER.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Observer - Memorio
|
|
2
2
|
|
|
3
|
-
> ⚠️ **DEPRECATED**: This function is deprecated and will be removed in future versions. Please use [`useObserver`](USEOBSERVER.md) instead.
|
|
4
|
-
|
|
5
3
|
Observer lets you react to state changes. When a state key changes, your callback function runs.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
@@ -21,9 +19,6 @@ import 'memorio';
|
|
|
21
19
|
### Example 1: Basic Usage
|
|
22
20
|
|
|
23
21
|
```javascript
|
|
24
|
-
// Simple observer (DEPRECATED - use useObserver instead)
|
|
25
|
-
console.warn('observer() is deprecated. Please use useObserver() for React or memorio.dispatch for vanilla JS.');
|
|
26
|
-
|
|
27
22
|
observer('state.counter', (newValue) => {
|
|
28
23
|
console.debug('Counter is now:', newValue);
|
|
29
24
|
});
|
|
@@ -35,8 +30,6 @@ state.counter = 5;
|
|
|
35
30
|
// Output: "Counter is now: 5"
|
|
36
31
|
```
|
|
37
32
|
|
|
38
|
-
> **Note**: For new projects, use [`useObserver`](USEOBSERVER.md) for React or [`memorio.dispatch`](SUMMARY.md) for vanilla JS.
|
|
39
|
-
|
|
40
33
|
### Example 2: Intermediate
|
|
41
34
|
|
|
42
35
|
```javascript
|
|
@@ -55,9 +48,8 @@ state.user = { name: 'Luigi' };
|
|
|
55
48
|
### Example 3: Advanced
|
|
56
49
|
|
|
57
50
|
```javascript
|
|
58
|
-
// Multiple
|
|
59
|
-
|
|
60
|
-
const obs2 = observer('state.data', handler2);
|
|
51
|
+
// Multiple callbacks for same path
|
|
52
|
+
observer('state.data', [handler1, handler2]);
|
|
61
53
|
|
|
62
54
|
// List all observers
|
|
63
55
|
console.debug(observer.list);
|
|
@@ -68,18 +60,45 @@ observer.remove('state.data');
|
|
|
68
60
|
|
|
69
61
|
// Remove all observers
|
|
70
62
|
observer.removeAll();
|
|
63
|
+
|
|
64
|
+
// Check if observer exists
|
|
65
|
+
if (observer.has('state.counter')) {
|
|
66
|
+
console.debug('Observer exists for counter');
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Direct Values (Vanilla JS)
|
|
73
|
+
|
|
74
|
+
Observer supports direct state values, not just string paths:
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
// Direct value - no string needed!
|
|
78
|
+
observer(state.counter, (newValue) => {
|
|
79
|
+
console.debug('Counter:', newValue);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// Works with objects too
|
|
83
|
+
observer(state.user, (newValue) => {
|
|
84
|
+
console.debug('User:', newValue?.name);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// Multiple callbacks as array
|
|
88
|
+
observer('state.data', [cb1, cb2, cb3]);
|
|
71
89
|
```
|
|
72
90
|
|
|
73
91
|
---
|
|
74
92
|
|
|
75
93
|
## API Reference
|
|
76
94
|
|
|
77
|
-
### observer(path, callback)
|
|
95
|
+
### observer(path, callback, option)
|
|
78
96
|
|
|
79
97
|
| Parameter | Type | Description |
|
|
80
98
|
|-----------|------|-------------|
|
|
81
|
-
| `path` | `string` | State path
|
|
82
|
-
| `callback` | `function` | Function called on change |
|
|
99
|
+
| `path` | `string \| object` | State path (e.g., `'state.counter'`) or direct state value |
|
|
100
|
+
| `callback` | `function \| array` | Function(s) called on change. Can be a single function or array of functions |
|
|
101
|
+
| `option` | `boolean` | Listen continuously (default: `true`) |
|
|
83
102
|
|
|
84
103
|
### Callback Parameters
|
|
85
104
|
|
|
@@ -102,6 +121,7 @@ observer('state.key', (newValue, oldValue) => {
|
|
|
102
121
|
|--------|------------|-------------|
|
|
103
122
|
| `observer.remove(name)` | `string` | Remove observer for specific path |
|
|
104
123
|
| `observer.removeAll()` | none | Remove all observers |
|
|
124
|
+
| `observer.has(name)` | `string` | Check if observer exists for path (returns boolean) |
|
|
105
125
|
|
|
106
126
|
---
|
|
107
127
|
|
package/markdown/USEOBSERVER.md
CHANGED
|
@@ -24,6 +24,7 @@ import 'memorio';
|
|
|
24
24
|
import 'memorio';
|
|
25
25
|
|
|
26
26
|
function Counter() {
|
|
27
|
+
// Direct values work! ✅
|
|
27
28
|
useObserver(() => {
|
|
28
29
|
console.debug('Counter changed:', state.counter);
|
|
29
30
|
}, [state.counter]);
|
|
@@ -63,14 +64,23 @@ function UserProfile() {
|
|
|
63
64
|
### Example 3: Advanced
|
|
64
65
|
|
|
65
66
|
```javascript
|
|
66
|
-
// Multiple watchers with array
|
|
67
|
+
// Multiple watchers with array - works with direct values
|
|
67
68
|
function MultiWatch() {
|
|
68
69
|
useObserver(() => {
|
|
69
70
|
console.debug('A or B changed:', state.a, state.b);
|
|
70
|
-
}, [state.a, state.b]);
|
|
71
|
-
|
|
71
|
+
}, [state.a, state.b]); // Direct values work!
|
|
72
|
+
|
|
72
73
|
return <div>{state.a} - {state.b}</div>;
|
|
73
74
|
}
|
|
75
|
+
|
|
76
|
+
// With string path (for store)
|
|
77
|
+
function StoreWatcher() {
|
|
78
|
+
useObserver(() => {
|
|
79
|
+
console.debug('Store changed');
|
|
80
|
+
}, 'store.userPreferences');
|
|
81
|
+
|
|
82
|
+
return <div />;
|
|
83
|
+
}
|
|
74
84
|
```
|
|
75
85
|
// With string path (for store)
|
|
76
86
|
function StoreWatcher() {
|
|
@@ -91,15 +101,49 @@ function StoreWatcher() {
|
|
|
91
101
|
| Parameter | Type | Description |
|
|
92
102
|
| --------- | ---- | ----------- |
|
|
93
103
|
| `callback` | `function` | Function to run on change |
|
|
94
|
-
| `deps` | `function \| string \| array` | State path(s) to watch |
|
|
104
|
+
| `deps` | `function \| string \| array \| proxy` | State path(s) to watch. Supports: |
|
|
105
|
+
| | | - Direct values: `state.counter` |
|
|
106
|
+
| | | - String paths: `'state.counter'` |
|
|
107
|
+
| | | - Arrow functions: `() => state.counter` |
|
|
108
|
+
| | | - Arrays: `[state.a, state.b]` or `['state.a', 'state.b']` |
|
|
109
|
+
| | | - Optional chaining: `[state?.one]` |
|
|
110
|
+
|
|
111
|
+
### Primitive Values
|
|
112
|
+
|
|
113
|
+
Direct primitive values are now fully supported:
|
|
114
|
+
|
|
115
|
+
```javascript
|
|
116
|
+
// Direct values work with primitives ✅
|
|
117
|
+
useObserver(() => { console.debug('changed') }, [state.counter])
|
|
118
|
+
|
|
119
|
+
// Arrays of primitives work ✅
|
|
120
|
+
useObserver(() => { console.log(state.a, state.b) }, [state.a, state.b])
|
|
121
|
+
|
|
122
|
+
// Optional chaining works ✅
|
|
123
|
+
useObserver(() => { console.log(state?.one) }, [state?.one])
|
|
124
|
+
|
|
125
|
+
// Strings still work ✅
|
|
126
|
+
useObserver(() => { console.debug('changed') }, ['state.counter'])
|
|
127
|
+
|
|
128
|
+
// Functions still work ✅
|
|
129
|
+
useObserver(() => { console.debug('changed') }, [() => state.counter])
|
|
130
|
+
```
|
|
95
131
|
|
|
96
132
|
### Callback Parameters
|
|
97
133
|
|
|
98
134
|
```javascript
|
|
135
|
+
// Single value (no array needed)
|
|
99
136
|
useObserver(
|
|
100
137
|
() => {
|
|
101
138
|
console.debug('Changed:', state.key);
|
|
102
|
-
},
|
|
139
|
+
}, state.key // Single value works!
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
// Array of values
|
|
143
|
+
useObserver(
|
|
144
|
+
() => {
|
|
145
|
+
console.debug('Changed:', state.key);
|
|
146
|
+
}, [state.key] // Array also works!
|
|
103
147
|
);
|
|
104
148
|
```
|
|
105
149
|
|
|
@@ -129,24 +173,79 @@ Returns a cleanup function:
|
|
|
129
173
|
|
|
130
174
|
## Common Patterns
|
|
131
175
|
|
|
132
|
-
### Sync with useState
|
|
176
|
+
### Sync with useState (Recommended for Primitives)
|
|
133
177
|
|
|
134
178
|
```javascript
|
|
135
|
-
function
|
|
136
|
-
|
|
179
|
+
function CounterComponent() {
|
|
180
|
+
// Sync memorio state with React state
|
|
181
|
+
const [counter, setCounter] = useState(state.counter)
|
|
182
|
+
|
|
183
|
+
// React useEffect works correctly with primitive values
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
console.log('Counter changed:', counter)
|
|
186
|
+
}, [counter])
|
|
187
|
+
|
|
188
|
+
// Direct values now work with primitives!
|
|
189
|
+
useObserver(() => {
|
|
190
|
+
setCounter(state.counter)
|
|
191
|
+
}, [state.counter]) // ✅ Works now!
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<div>
|
|
195
|
+
<button onClick={() => { state.counter++ }}>Increment</button>
|
|
196
|
+
<span>{counter}</span>
|
|
197
|
+
</div>
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
```
|
|
137
201
|
|
|
138
|
-
|
|
139
|
-
setData(newVal);
|
|
140
|
-
}, [state.data]);
|
|
202
|
+
### Safe Access with Optional Chaining (Protection)
|
|
141
203
|
|
|
142
|
-
|
|
204
|
+
```javascript
|
|
205
|
+
// Optional chaining is supported - protects against errors
|
|
206
|
+
useObserver(() => {
|
|
207
|
+
if (test?.one) {
|
|
208
|
+
console.log(test.one)
|
|
209
|
+
}
|
|
210
|
+
}, [test?.one])
|
|
211
|
+
|
|
212
|
+
// Works with objects
|
|
213
|
+
function SafeComponent() {
|
|
214
|
+
const [test, setTest] = useState(state.test)
|
|
215
|
+
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
if (test?.one) {
|
|
218
|
+
console.log('test.one:', test.one)
|
|
219
|
+
}
|
|
220
|
+
}, [test?.one])
|
|
221
|
+
|
|
222
|
+
useObserver(() => {
|
|
223
|
+
if (state.test?.one) {
|
|
224
|
+
setTest(state.test)
|
|
225
|
+
}
|
|
226
|
+
}, ['state.test.one'])
|
|
227
|
+
|
|
228
|
+
return <div>{test?.one || 'Loading...'}</div>
|
|
143
229
|
}
|
|
144
230
|
```
|
|
145
231
|
|
|
146
232
|
### Multiple Watchers
|
|
147
233
|
|
|
148
234
|
```javascript
|
|
149
|
-
|
|
235
|
+
// Watch multiple properties with strings
|
|
236
|
+
useObserver(() => {
|
|
237
|
+
console.log(state.a, state.b)
|
|
238
|
+
}, ['state.a', 'state.b'])
|
|
239
|
+
|
|
240
|
+
// Watch multiple properties with functions
|
|
241
|
+
useObserver(() => {
|
|
242
|
+
console.log(state.a, state.b)
|
|
243
|
+
}, [() => state.a, () => state.b])
|
|
244
|
+
|
|
245
|
+
// Watch with auto-discovery
|
|
246
|
+
useObserver(() => {
|
|
247
|
+
console.log(state.a, state.b) // Automatically tracks both
|
|
248
|
+
}, [])
|
|
150
249
|
```
|
|
151
250
|
|
|
152
251
|
---
|
package/package.json
CHANGED
package/types/memorio.d.ts
CHANGED
|
@@ -29,6 +29,9 @@ interface _memorio {
|
|
|
29
29
|
_tracking?: boolean
|
|
30
30
|
_trackedPaths?: Set<string>
|
|
31
31
|
_locked?: boolean
|
|
32
|
+
_lastAccessedPath?: string
|
|
33
|
+
_stateVersion?: number
|
|
34
|
+
_propertyAccessLog?: string[]
|
|
32
35
|
// Platform detection
|
|
33
36
|
isBrowser: () => boolean
|
|
34
37
|
isNode: () => boolean
|
package/types/store.d.ts
CHANGED
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Code of Conduct — memorio
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to make participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
-
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
-
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to a positive environment for our
|
|
15
|
-
community include:
|
|
16
|
-
|
|
17
|
-
* Demonstrating empathy and kindness toward other people
|
|
18
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
19
|
-
* Giving and gracefully accepting constructive feedback
|
|
20
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
21
|
-
and learning from the experience
|
|
22
|
-
* Focusing on what is best not just for us as individuals, but for the
|
|
23
|
-
overall community
|
|
24
|
-
|
|
25
|
-
Examples of unacceptable behavior include:
|
|
26
|
-
|
|
27
|
-
* The use of sexualized language or imagery, and sexual attention or advances
|
|
28
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
-
* Public or private harassment
|
|
30
|
-
* Publishing others' private information, such as a physical or email
|
|
31
|
-
address, without their explicit permission
|
|
32
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
33
|
-
professional setting
|
|
34
|
-
|
|
35
|
-
## Our Responsibilities
|
|
36
|
-
|
|
37
|
-
Project maintainers are responsible for clarifying and enforcing our standards of
|
|
38
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
39
|
-
response to any behavior that they deem inappropriate,
|
|
40
|
-
threatening, offensive, or harmful.
|
|
41
|
-
|
|
42
|
-
Project maintainers have the right and responsibility to remove, edit, or reject
|
|
43
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
44
|
-
not aligned to this Code of Conduct, and will
|
|
45
|
-
communicate reasons for moderation decisions when appropriate.
|
|
46
|
-
|
|
47
|
-
## Scope
|
|
48
|
-
|
|
49
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
50
|
-
an individual is officially representing the community in public spaces.
|
|
51
|
-
Examples of representing our community include using an official e-mail address,
|
|
52
|
-
posting via an official social media account, or acting as an appointed
|
|
53
|
-
representative at an online or offline event.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported to the community leaders responsible for enforcement at <dariopassariello@gmail.com>.
|
|
59
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
60
|
-
|
|
61
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
62
|
-
reporter of any incident.
|
|
63
|
-
|
|
64
|
-
## Enforcement Guidelines
|
|
65
|
-
|
|
66
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
67
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
68
|
-
|
|
69
|
-
### 1. Correction
|
|
70
|
-
|
|
71
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
72
|
-
unprofessional or unwelcome in the community.
|
|
73
|
-
|
|
74
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
75
|
-
clarity around the nature of the violation and an explanation of why the
|
|
76
|
-
behavior was inappropriate. A public apology may be requested.
|
|
77
|
-
|
|
78
|
-
### 2. Warning
|
|
79
|
-
|
|
80
|
-
**Community Impact**: A violation through a single incident or series
|
|
81
|
-
of actions.
|
|
82
|
-
|
|
83
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
84
|
-
interaction with the people involved, including unsolicited interaction with
|
|
85
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
86
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
87
|
-
like social media. Violating these terms may lead to a temporary or
|
|
88
|
-
permanent ban.
|
|
89
|
-
|
|
90
|
-
### 3. Temporary Ban
|
|
91
|
-
|
|
92
|
-
**Community Impact**: A serious violation of community standards, including
|
|
93
|
-
sustained inappropriate behavior.
|
|
94
|
-
|
|
95
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
96
|
-
communication with the community for a specified period of time. No public or
|
|
97
|
-
private interaction with the people involved, including unsolicited interaction
|
|
98
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
99
|
-
Violating these terms may lead to a permanent ban.
|
|
100
|
-
|
|
101
|
-
### 4. Permanent Ban
|
|
102
|
-
|
|
103
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
104
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
105
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
106
|
-
|
|
107
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
|
108
|
-
the community.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
First off, thanks for taking the time to contribute!
|
|
4
|
-
|
|
5
|
-
All types of contributions are encouraged and valued. See the [Table of Contents](contributing.md#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions.
|
|
6
|
-
|
|
7
|
-
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
|
|
8
|
-
>
|
|
9
|
-
> * Star the project
|
|
10
|
-
> * Tweet about it
|
|
11
|
-
> * Refer this project in your project's readme
|
|
12
|
-
> * Mention the project at local meetups and tell your friends/colleagues
|
|
13
|
-
|
|
14
|
-
## Table of Contents
|
|
15
|
-
|
|
16
|
-
* [Code of Conduct](contributing.md#code-of-conduct)
|
|
17
|
-
* [I Have a Question](contributing.md#i-have-a-question)
|
|
18
|
-
* [I Want To Contribute](contributing.md#i-want-to-contribute)
|
|
19
|
-
* [Reporting Bugs](contributing.md#reporting-bugs)
|
|
20
|
-
* [Suggesting Enhancements](contributing.md#suggesting-enhancements)
|
|
21
|
-
* [Your First Code Contribution](contributing.md#your-first-code-contribution)
|
|
22
|
-
* [Improving The Documentation](contributing.md#improving-the-documentation)
|
|
23
|
-
* [Style guides](contributing.md#styleguides)
|
|
24
|
-
* [Commit Messages](contributing.md#commit-messages)
|
|
25
|
-
* [Join The Project Team](contributing.md#join-the-project-team)
|
|
26
|
-
|
|
27
|
-
## Code of Conduct
|
|
28
|
-
|
|
29
|
-
This project and everyone participating in it is governed by the [memorio Code of Conduct](https://github.com/picla-net/picla.npm.memorio/blob/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [dariopassariello@gmail.com](mailto:dariopassariello@gmail.com).
|
|
30
|
-
|
|
31
|
-
## I Have a Question
|
|
32
|
-
|
|
33
|
-
Before you ask a question, it is best to search for existing [Issues](https://github.com/picla-net/picla.npm.memorio/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
|
|
34
|
-
|
|
35
|
-
If you then still feel the need to ask a question and need clarification, we recommend the following:
|
|
36
|
-
|
|
37
|
-
* Open an [Issue](https://github.com/picla-net/picla.npm.memorio/issues/new).
|
|
38
|
-
* Provide as much context as you can about what you're running into.
|
|
39
|
-
* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
|
|
40
|
-
|
|
41
|
-
We will then take care of the issue as soon as possible.
|
|
42
|
-
|
|
43
|
-
## I Want To Contribute
|
|
44
|
-
|
|
45
|
-
> ### Legal Notice
|
|
46
|
-
>
|
|
47
|
-
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
|
|
48
|
-
|
|
49
|
-
### Reporting Bugs
|
|
50
|
-
|
|
51
|
-
#### Before Submitting a Bug Report
|
|
52
|
-
|
|
53
|
-
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
|
|
54
|
-
|
|
55
|
-
* Make sure that you are using the latest version.
|
|
56
|
-
* Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment
|
|
57
|
-
* To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/picla-net/picla.npm.memorio/issues?q=label%3Abug).
|
|
58
|
-
* Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
|
|
59
|
-
* Collect information about the bug:
|
|
60
|
-
* Stack trace (Traceback)
|
|
61
|
-
* OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
|
|
62
|
-
* Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
|
|
63
|
-
* Possibly your input and the output
|
|
64
|
-
* Can you reliably reproduce the issue? And can you also reproduce it with older versions?
|
|
65
|
-
|
|
66
|
-
#### How Do I Submit a Good Bug Report?
|
|
67
|
-
|
|
68
|
-
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to [dariopassariello@gmail.com](mailto:dariopassariello@gmail.com).
|
|
69
|
-
|
|
70
|
-
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
|
|
71
|
-
|
|
72
|
-
* Open an [Issue](https://github.com/picla-net/picla.npm.memorio/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
|
|
73
|
-
* Explain the behavior you would expect and the actual behavior.
|
|
74
|
-
* Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
|
|
75
|
-
* Provide the information you collected in the previous section.
|
|
76
|
-
|
|
77
|
-
Once it's filed:
|
|
78
|
-
|
|
79
|
-
* The project team will label the issue accordingly.
|
|
80
|
-
* A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
|
|
81
|
-
* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](contributing.md#your-first-code-contribution).
|
|
82
|
-
|
|
83
|
-
### Suggesting Enhancements
|
|
84
|
-
|
|
85
|
-
This section guides you through submitting an enhancement suggestion for memorio, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
|
|
86
|
-
|
|
87
|
-
#### Before Submitting an Enhancement
|
|
88
|
-
|
|
89
|
-
* Make sure that you are using the latest version.
|
|
90
|
-
* Perform a [search](https://github.com/picla-net/picla.npm.memorio/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
|
91
|
-
* Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
|
92
|
-
|
|
93
|
-
#### How Do I Submit a Good Enhancement Suggestion?
|
|
94
|
-
|
|
95
|
-
Enhancement suggestions are tracked as [GitHub issues](https://github.com/picla-net/picla.npm.memorio/issues).
|
|
96
|
-
|
|
97
|
-
* Use a **clear and descriptive title** for the issue to identify the suggestion.
|
|
98
|
-
* Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
|
|
99
|
-
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
|
|
100
|
-
* You may want to **include screenshots or screen recordings** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [screentogif](https://www.screentogif.com/) to record GIFs on macOS and Windows, and the built-in [screen recorder in GNOME](https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en) or [SimpleScreenRecorder](https://github.com/MaartenBaert/ssr) on Linux.
|
|
101
|
-
* **Explain why this enhancement would be useful** to most boilerplate users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
|
|
102
|
-
|
|
103
|
-
## Join The Project Team
|
|
104
|
-
|
|
105
|
-
Please send email to <dariopassariello@gmail.com>
|