relay-forms-nodeps 1.0.0 → 1.1.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.
Files changed (39) hide show
  1. package/README.md +23 -108
  2. package/lib/RelayFormsTypes.d.ts +1 -0
  3. package/lib/Utils.d.ts +5 -8
  4. package/lib/Utils.js +10 -65
  5. package/lib/es/RelayFormsTypes.d.ts +1 -0
  6. package/lib/es/Utils.d.ts +5 -8
  7. package/lib/es/Utils.js +10 -67
  8. package/lib/es/relay/RelayRecordProxy.d.ts +1 -0
  9. package/lib/es/relay/RelayRecordProxy.js +3 -0
  10. package/lib/es/relay/RelayRecordSourceMutator.d.ts +1 -0
  11. package/lib/es/relay/RelayRecordSourceMutator.js +13 -0
  12. package/lib/es/relay/RelayTypes.d.ts +1 -0
  13. package/lib/es/relay/queries.d.ts +6 -4
  14. package/lib/es/relay/queries.js +6 -3
  15. package/lib/es/useFormSetValue.d.ts +5 -1
  16. package/lib/es/useFormSetValue.js +162 -64
  17. package/lib/es/useFormState.d.ts +12 -2
  18. package/lib/es/useFormState.js +10 -40
  19. package/lib/es/useFormSubmit.js +104 -89
  20. package/lib/es/useFormValue.js +1 -1
  21. package/lib/relay/RelayRecordProxy.d.ts +1 -0
  22. package/lib/relay/RelayRecordProxy.js +3 -0
  23. package/lib/relay/RelayRecordSourceMutator.d.ts +1 -0
  24. package/lib/relay/RelayRecordSourceMutator.js +13 -0
  25. package/lib/relay/RelayTypes.d.ts +1 -0
  26. package/lib/relay/queries.d.ts +6 -4
  27. package/lib/relay/queries.js +6 -3
  28. package/lib/umd/relay-forms-nodeps.js +319 -273
  29. package/lib/umd/relay-forms-nodeps.js.map +1 -1
  30. package/lib/umd/relay-forms-nodeps.min.js +1 -1
  31. package/lib/umd/relay-forms-nodeps.min.js.map +1 -1
  32. package/lib/useFormSetValue.d.ts +5 -1
  33. package/lib/useFormSetValue.js +162 -63
  34. package/lib/useFormState.d.ts +12 -2
  35. package/lib/useFormState.js +10 -40
  36. package/lib/useFormSubmit.js +103 -88
  37. package/lib/useFormValue.js +1 -1
  38. package/package.json +15 -2
  39. package/yarn-error.log +31 -31
@@ -9,82 +9,181 @@ var RelayStoreProvider_1 = require("./relay/RelayStoreProvider");
9
9
  var RelayStoreUtils_1 = require("./relay/RelayStoreUtils");
10
10
  var useForceUpdate_1 = require("./useForceUpdate");
11
11
  var Utils_1 = require("./Utils");
12
- function useFormSetValue(_a) {
13
- var key = _a.key,
14
- initialValue = _a.initialValue,
15
- validate = _a.validate,
16
- validateOnChange = _a.validateOnChange;
17
- var forceUpdate = useForceUpdate_1.useForceUpdate();
18
- var environment = RelayStoreProvider_1.useStore();
19
- var ref = React.useRef({
20
- value: initialValue,
21
- error: undefined,
22
- check: validate ? 'INIT' : 'DONE',
12
+ var INIT = 0;
13
+ exports.TOBEVALIDATE = 1;
14
+ exports.VALIDATING = 2;
15
+ var DONE = 3;
16
+ var DONEVALIDATED = 4;
17
+ exports.RESET = 5;
18
+ function getInitCheck(validate) {
19
+ return validate ? exports.TOBEVALIDATE : DONE;
20
+ }
21
+ function isDone(check) {
22
+ return check === DONE || check === DONEVALIDATED;
23
+ }
24
+ exports.isDone = isDone;
25
+ function logicSetValue(params) {
26
+ var environment = params.environment,
27
+ key = params.key,
28
+ initialValue = params.initialValue,
29
+ forceUpdate = params.forceUpdate,
30
+ validateOnChange = params.validateOnChange,
31
+ label = params.label;
32
+ var validate = undefined;
33
+ var firstSet = true;
34
+ var localId = Utils_1.getFieldId(key);
35
+ function getValidate() {
36
+ return validate;
37
+ }
38
+ var ref = {
39
+ check: INIT,
23
40
  isChecking: false
24
- });
25
- var setValue = React.useCallback(function (newValue) {
26
- ref.current.value = newValue;
27
- if (ref.current.check === 'DONE' && validate) {
28
- ref.current.check = 'START';
41
+ };
42
+ var dataResult = {
43
+ value: initialValue,
44
+ error: undefined
45
+ };
46
+ function commitField(commitValue) {
47
+ if (commitValue === void 0) {
48
+ commitValue = true;
49
+ }
50
+ Utils_1.commit(environment, function (store, form) {
51
+ var field = store.get(localId);
52
+ if (!field) {
53
+ field = store.create(localId).setValue(localId, 'id').setValue(label, 'label').setValue(key, 'key');
54
+ var entriesArray = form.getLinkedRecords('entries');
55
+ entriesArray.push(field);
56
+ form.setLinkedRecords(entriesArray, 'entries');
57
+ }
58
+ if (ref.check === exports.VALIDATING) {
59
+ form.setValue(true, 'isValidating');
60
+ }
61
+ field.setValue(ref.check, 'check').setValue(dataResult.error, 'error');
62
+ if (commitValue) field.setValue(dataResult.value, 'value');
63
+ });
64
+ }
65
+ function setValidate(newValidate) {
66
+ if (validate === newValidate && !firstSet) {
67
+ // first set only needs this
68
+ return;
29
69
  }
30
- Utils_1.commitValue(key, newValue, ref.current.check, environment);
70
+ firstSet = false;
71
+ validate = newValidate;
72
+ // validation was called
73
+ if (ref.check === DONEVALIDATED && validate) {
74
+ ref.check = exports.VALIDATING;
75
+ } else {
76
+ // reinit
77
+ ref.check = getInitCheck(validate);
78
+ }
79
+ commitField();
80
+ }
81
+ function getData() {
82
+ return dataResult;
83
+ }
84
+ function changeData(value, error) {
85
+ dataResult = {
86
+ value: value,
87
+ error: error
88
+ };
31
89
  forceUpdate();
32
- }, [environment, key, validate, forceUpdate]);
33
- React.useEffect(function () {
34
- //commitResetField(environment, key);
35
- Utils_1.commitValue(key, initialValue, ref.current.check, environment);
90
+ }
91
+ function setValue(newValue) {
92
+ setValueInternal(newValue);
93
+ }
94
+ function setValueInternal(newValue, error) {
95
+ if (ref.check === DONEVALIDATED) {
96
+ ref.check = exports.VALIDATING;
97
+ }
98
+ changeData(newValue, error);
99
+ commitField();
100
+ }
101
+ function finalizeCheck(error) {
102
+ ref.isChecking = false;
103
+ ref.check = DONEVALIDATED;
104
+ if (dataResult.error !== error) {
105
+ changeData(dataResult.value, error);
106
+ }
107
+ commitField(false);
108
+ }
109
+ function internalValidate(value, validateFunction) {
110
+ ref.isChecking = true;
111
+ var result = validateFunction(value);
112
+ function internalFinalize(error) {
113
+ var validate = getValidate();
114
+ if (value !== dataResult.value || validate !== validateFunction) {
115
+ internalValidate(dataResult.value, validate);
116
+ return;
117
+ }
118
+ finalizeCheck(error);
119
+ }
120
+ if (RelayStoreUtils_1.isPromise(result)) {
121
+ result.then(internalFinalize).catch(internalFinalize);
122
+ } else {
123
+ internalFinalize(result);
124
+ }
125
+ }
126
+ function subscribe() {
36
127
  var snapshot = Utils_1.getSnapshot(environment, queries_1.FragmentSet, key);
37
128
  var disposeSubscrition = environment.subscribe(snapshot, function (s) {
38
- var check = s.data.check;
39
- var isStart = check === 'START';
40
- var isReset = check === 'RESET';
41
- ref.current.check = check;
129
+ var data = s.data;
130
+ var dataCheck = data.check;
131
+ var isValidating = dataCheck === exports.VALIDATING;
132
+ var isReset = dataCheck === exports.RESET;
133
+ ref.check = dataCheck;
134
+ var validate = getValidate();
42
135
  if (isReset) {
43
- ref.current.check = validate ? 'INIT' : 'DONE';
44
- setValue(initialValue);
45
- } else {
46
- if (!validate) {
47
- Utils_1.commitErrorIntoRelay(key, undefined, environment);
48
- return;
49
- }
50
- if (isStart && !ref.current.isChecking) {
51
- internalValidate(ref.current.value);
52
- }
136
+ ref.check = getInitCheck(validate);
137
+ setValueInternal(initialValue);
138
+ } else if (isValidating && !ref.isChecking) {
139
+ internalValidate(dataResult.value, validate);
53
140
  }
54
141
  }).dispose;
55
142
  var dispose = function () {
56
143
  disposeSubscrition();
57
- Utils_1.commitResetField(environment, key);
144
+ Utils_1.commit(environment, function (store, form) {
145
+ var entriesArray = form.getLinkedRecords('entries');
146
+ var newEntries = entriesArray.filter(function (value) {
147
+ return value.getDataID() != localId;
148
+ });
149
+ form.setLinkedRecords(newEntries, 'entries');
150
+ store.delete(localId);
151
+ });
58
152
  };
59
- function finalizeCheck(error) {
60
- ref.current.isChecking = false;
61
- if (ref.current.error !== error) {
62
- ref.current.error = error;
63
- forceUpdate();
64
- }
65
- Utils_1.commitErrorIntoRelay(key, error, environment);
66
- }
67
- function internalValidate(value) {
68
- ref.current.isChecking = true;
69
- var result = validate(value);
70
- function internalFinalize(error) {
71
- if (value !== ref.current.value) {
72
- internalValidate(ref.current.value);
73
- return;
74
- }
75
- finalizeCheck(error);
76
- }
77
- if (RelayStoreUtils_1.isPromise(result)) {
78
- result.then(internalFinalize).catch(internalFinalize);
79
- } else {
80
- internalFinalize(result);
81
- }
82
- }
83
153
  if (validateOnChange) {
84
- internalValidate(initialValue);
154
+ internalValidate(initialValue, getValidate());
85
155
  }
86
156
  return dispose;
87
- }, [environment, initialValue, key, setValue, validate, validateOnChange, forceUpdate]);
88
- return [ref.current, setValue];
157
+ }
158
+ return {
159
+ subscribe: subscribe,
160
+ getData: getData,
161
+ setValue: setValue,
162
+ setValidate: setValidate
163
+ };
164
+ }
165
+ function useFormSetValue(_a) {
166
+ var key = _a.key,
167
+ initialValue = _a.initialValue,
168
+ validate = _a.validate,
169
+ validateOnChange = _a.validateOnChange,
170
+ label = _a.label;
171
+ var forceUpdate = useForceUpdate_1.useForceUpdate();
172
+ var environment = RelayStoreProvider_1.useStore();
173
+ var resolver = React.useMemo(function () {
174
+ return logicSetValue({
175
+ environment: environment,
176
+ key: key,
177
+ label: label,
178
+ initialValue: initialValue,
179
+ forceUpdate: forceUpdate,
180
+ validateOnChange: validateOnChange
181
+ });
182
+ }, [environment, key, initialValue, forceUpdate, validateOnChange, label]);
183
+ resolver.setValidate(validate);
184
+ React.useEffect(function () {
185
+ return resolver.subscribe();
186
+ }, [resolver]);
187
+ return [resolver.getData(), resolver.setValue];
89
188
  }
90
189
  exports.useFormSetValue = useFormSetValue;
@@ -1,2 +1,12 @@
1
- import { FormStateReturn } from './RelayFormsTypes';
2
- export declare const useFormState: () => FormStateReturn;
1
+ export declare const useFormState: () => {
2
+ readonly errors: readonly {
3
+ readonly check: number;
4
+ readonly error: string;
5
+ readonly id: string;
6
+ readonly key: string;
7
+ readonly label: string;
8
+ }[];
9
+ readonly isSubmitting: boolean;
10
+ readonly isValid: boolean;
11
+ readonly isValidating: boolean;
12
+ };
@@ -5,50 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  var React = require("react");
7
7
  var RelayStoreProvider_1 = require("./relay/RelayStoreProvider");
8
- var RelayStoreUtils_1 = require("./relay/RelayStoreUtils");
9
- var useForceUpdate_1 = require("./useForceUpdate");
10
8
  var Utils_1 = require("./Utils");
11
9
  exports.useFormState = function () {
12
- var ref = React.useRef({
13
- errors: undefined,
14
- isValidating: false,
15
- isSubmitting: false,
16
- isValid: false
17
- });
18
- var forceUpdate = useForceUpdate_1.useForceUpdate();
19
10
  var environment = RelayStoreProvider_1.useStore();
11
+ var snapshot = React.useMemo(function () {
12
+ return environment.lookup(Utils_1.operationQueryErrorsForm.fragment);
13
+ }, [environment]);
14
+ var _a = React.useState(snapshot.data.form),
15
+ data = _a[0],
16
+ setData = _a[1];
20
17
  React.useEffect(function () {
21
- function checkError(s) {
22
- var data = s.data;
23
- var form = data.form;
24
- var entries = form.entries;
25
- var current = ref.current;
26
- var entryErrors = entries.filter(function (value) {
27
- return !!value.error;
28
- });
29
- var entryValidated = entries.filter(function (value) {
30
- return value.check === 'DONE';
31
- });
32
- var errors = entryErrors.length > 0 ? entryErrors : undefined;
33
- var isValidating = form.isValidating;
34
- var isSubmitting = form.isSubmitting;
35
- var isValid = entries.length === entryValidated.length && (!errors || Object.keys(errors).length === 0);
36
- var newState = {
37
- errors: errors,
38
- isValid: isValid,
39
- isValidating: isValidating,
40
- isSubmitting: isSubmitting
41
- };
42
- if (!RelayStoreUtils_1.areEqual(current, newState)) {
43
- ref.current = newState;
44
- forceUpdate();
45
- }
46
- }
47
- var snapshot = environment.lookup(Utils_1.operationQueryErrorsForm.fragment);
48
- checkError(snapshot);
49
18
  return environment.subscribe(snapshot, function (s) {
50
- checkError(s);
19
+ setData(s.data.form);
51
20
  }).dispose;
52
- }, [environment, forceUpdate]);
53
- return ref.current;
21
+ // eslint-disable-next-line react-hooks/exhaustive-deps
22
+ }, [snapshot]);
23
+ return data;
54
24
  };
@@ -6,105 +6,120 @@ Object.defineProperty(exports, "__esModule", {
6
6
  var React = require("react");
7
7
  var RelayStoreProvider_1 = require("./relay/RelayStoreProvider");
8
8
  var RelayStoreUtils_1 = require("./relay/RelayStoreUtils");
9
+ var useFormSetValue_1 = require("./useFormSetValue");
9
10
  var Utils_1 = require("./Utils");
10
- exports.useFormSubmit = function (_a) {
11
- var onSubmit = _a.onSubmit;
12
- var environment = RelayStoreProvider_1.useStore();
13
- React.useEffect(function () {
14
- return environment.retain(Utils_1.operationQueryForm).dispose;
15
- }, [environment]);
16
- var ref = React.useRef({
17
- isSubmitting: false,
18
- isValidating: false,
19
- error: undefined,
20
- subscription: undefined
21
- });
22
- var internalValidate = React.useCallback(function (snapshot, isSubmitting) {
23
- ref.current.isValidating = true;
24
- var data = snapshot.data;
25
- var filtered = data.form.entries.filter(function (value) {
26
- return value.check === 'INIT';
27
- });
28
- Utils_1.commitValidateIntoRelay(filtered, isSubmitting, environment);
29
- }, [environment]);
30
- var execute = React.useCallback(function (environment, snapshot, dispose, onSubmit) {
11
+ function logicSubmit(environment, onSubmit) {
12
+ function dispose() {
13
+ subscription && subscription.dispose();
14
+ subscription = undefined;
15
+ }
16
+ var isSubmitting = false;
17
+ var subscription;
18
+ function execute(snapshot) {
19
+ var disposeSubmit = function () {
20
+ isSubmitting = false;
21
+ Utils_1.commit(environment, function (_, form) {
22
+ form.setValue(false, 'isSubmitting');
23
+ });
24
+ };
31
25
  var data = snapshot.data;
32
26
  var entries = data.form.entries;
33
27
  var filtered = entries.filter(function (value) {
34
- return value.check === 'DONE';
28
+ return useFormSetValue_1.isDone(value.check);
29
+ });
30
+ var isValidating = filtered.length !== entries.length;
31
+ var errors = entries.filter(function (value) {
32
+ return !!value.error;
33
+ }).map(function (value) {
34
+ return value.id;
35
35
  });
36
- if (filtered.length === entries.length) {
37
- var errors = entries.filter(function (value) {
38
- return !!value.error;
36
+ var isValid = !isValidating && errors.length === 0;
37
+ Utils_1.commit(environment, function (store, form) {
38
+ form.setValue(isValidating, 'isValidating').setValue(isValid, 'isValid');
39
+ var errorFields = [];
40
+ errors.forEach(function (id) {
41
+ errorFields.push(store.get(id));
39
42
  });
40
- Utils_1.commitValidateEndRelay(environment);
41
- ref.current.isValidating = false;
42
- var internalDispose = function () {
43
- dispose();
44
- if (ref.current.isSubmitting) {
45
- ref.current.isSubmitting = false;
46
- Utils_1.commitSubmitEndRelay(environment);
47
- }
48
- };
49
- if (ref.current.isSubmitting && onSubmit && errors.length === 0) {
50
- var result_1 = {};
51
- entries.forEach(function (entry) {
52
- result_1[entry.key] = entry.value;
53
- });
54
- var submit_1 = onSubmit(result_1);
55
- if (RelayStoreUtils_1.isPromise(submit_1)) {
56
- submit_1.then(internalDispose).catch(internalDispose);
57
- return;
58
- }
43
+ form.setLinkedRecords(errorFields, 'errors');
44
+ });
45
+ if (isValid && isSubmitting) {
46
+ dispose();
47
+ var result_1 = {};
48
+ entries.forEach(function (entry) {
49
+ result_1[entry.key] = entry.value;
50
+ });
51
+ var submit_1 = onSubmit(result_1);
52
+ if (RelayStoreUtils_1.isPromise(submit_1)) {
53
+ submit_1.then(disposeSubmit).catch(disposeSubmit);
54
+ return;
59
55
  }
60
- internalDispose();
61
- }
62
- }, []);
63
- var reset = React.useCallback(function () {
64
- var snapshot = environment.lookup(Utils_1.operationQueryForm.fragment);
65
- if (ref.current.isValidating && ref.current.isSubmitting) {
66
- return;
56
+ } else if (!isValidating) {
57
+ disposeSubmit();
67
58
  }
68
- var data = snapshot.data;
69
- Utils_1.commitResetIntoRelay(data.form.entries, environment);
70
- }, [environment]);
71
- var subscribe = React.useCallback(function (submit) {
72
- if (submit === void 0) {
73
- submit = false;
74
- }
75
- var snapshot = environment.lookup(Utils_1.operationQueryForm.fragment);
76
- var subscription = ref.current.subscription;
77
- subscription && subscription.dispose();
78
- function dispose() {
79
- subscription && subscription.dispose();
80
- ref.current.subscription = null;
59
+ }
60
+ function reset() {
61
+ if (!isSubmitting) {
62
+ dispose();
63
+ Utils_1.commit(environment, function (_, form) {
64
+ form.setValue(false, 'isSubmitting').setValue(false, 'isValidating').setLinkedRecords([], 'errors').getLinkedRecords('entries').forEach(function (entry) {
65
+ return entry.setValue(useFormSetValue_1.RESET, 'check').setValue(undefined, 'error');
66
+ });
67
+ });
81
68
  }
82
- ref.current.subscription = environment.subscribe(snapshot, function (s) {
83
- return execute(environment, s, dispose, onSubmit);
69
+ }
70
+ function validate() {
71
+ Utils_1.commit(environment, function (_, form) {
72
+ var tobeValitating = form.setValue(isSubmitting, 'isSubmitting').getLinkedRecords('entries').filter(function (value) {
73
+ return value.getValue('check') === useFormSetValue_1.TOBEVALIDATE;
74
+ });
75
+ form.setValue(tobeValitating.length === 0, 'isValidating');
76
+ tobeValitating.forEach(function (entry) {
77
+ return entry.setValue(useFormSetValue_1.VALIDATING, 'check');
78
+ });
84
79
  });
85
- internalValidate(snapshot, submit);
86
- execute(environment, snapshot, dispose, onSubmit);
87
- }, [environment, internalValidate, execute, onSubmit]);
88
- var validate = React.useCallback(function () {
89
- if (!ref.current.isValidating) {
90
- subscribe(false);
91
- }
92
- }, [subscribe]);
93
- var submit = React.useCallback(function (event) {
94
- if (event) {
95
- event.preventDefault();
80
+ var snapshot = environment.lookup(Utils_1.operationQueryForm.fragment);
81
+ if (!subscription) {
82
+ subscription = environment.subscribe(snapshot, function (s) {
83
+ return execute(s);
84
+ });
96
85
  }
97
- if (!ref.current.isSubmitting) {
98
- ref.current.isSubmitting = true;
99
- subscribe(true);
86
+ execute(snapshot);
87
+ }
88
+ function submit(event) {
89
+ event && event.preventDefault();
90
+ if (!isSubmitting) {
91
+ isSubmitting = true;
92
+ validate();
100
93
  }
101
- }, [subscribe]);
102
- var result = React.useMemo(function () {
103
- return {
104
- submit: submit,
105
- validate: validate,
106
- reset: reset
94
+ }
95
+ function subscribe() {
96
+ var disposeRetain = environment.retain(Utils_1.operationQueryForm).dispose;
97
+ return function () {
98
+ dispose();
99
+ disposeRetain();
107
100
  };
108
- }, [submit, validate, reset]);
109
- return result;
101
+ }
102
+ var result = {
103
+ submit: submit,
104
+ validate: validate,
105
+ reset: reset
106
+ };
107
+ function getData() {
108
+ return result;
109
+ }
110
+ return {
111
+ subscribe: subscribe,
112
+ getData: getData
113
+ };
114
+ }
115
+ exports.useFormSubmit = function (_a) {
116
+ var onSubmit = _a.onSubmit;
117
+ var environment = RelayStoreProvider_1.useStore();
118
+ var resolver = React.useMemo(function () {
119
+ return logicSubmit(environment, onSubmit);
120
+ }, [environment, onSubmit]);
121
+ React.useEffect(function () {
122
+ return resolver.subscribe();
123
+ }, [resolver]);
124
+ return resolver.getData();
110
125
  };
@@ -19,7 +19,7 @@ function useFormValue(key) {
19
19
  return environment.subscribe(snapshot, function (s) {
20
20
  setData(s.data);
21
21
  }).dispose;
22
- }, [environment, snapshot, setData]);
22
+ }, [environment, snapshot]);
23
23
  return data;
24
24
  }
25
25
  exports.useFormValue = useFormValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relay-forms-nodeps",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "keywords": [
5
5
  "forms",
6
6
  "relay",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "scripts": {
26
26
  "clean": "rimraf lib",
27
- "relay": "relay-compiler --src ./compile/ --schema ./forms.graphql --language typescript --artifactDirectory ./src/relay --persist-output ./ignore-queries.json",
27
+ "relay": "relay-compiler",
28
28
  "compile": "npm run clean && tsc && tsc --project tsconfig.esm.json && npm run build:js && npm run build:replace && npm run rollup",
29
29
  "build": "npm run compile && npm run test",
30
30
  "fast:test": "npm run clean && tsc && npm run test",
@@ -37,6 +37,19 @@
37
37
  "build:replace": "replace-in-file --configFile=replace.config.js",
38
38
  "rollup": "rollup -c"
39
39
  },
40
+ "relay": {
41
+ "src": "./compile/",
42
+ "schema": "./forms.graphql",
43
+ "excludes": [
44
+ "__generated__",
45
+ "node_modules"
46
+ ],
47
+ "language": "typescript",
48
+ "artifactDirectory": "./src/relay",
49
+ "persistConfig": {
50
+ "file": "./ignore-queries.json"
51
+ }
52
+ },
40
53
  "peerDependencies": {
41
54
  "react": "^16.9.0 || ^17 || ^18"
42
55
  },
package/yarn-error.log CHANGED
@@ -1,27 +1,27 @@
1
- Arguments:
2
- C:\Program Files\nodejs\node.exe C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js fast:test
3
-
4
- PATH:
5
- C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\app\lorenzo.digiacomo\product\11.2.0\client_1\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\nodejs\;C:\gradle-5.6.4\bin;C:\apache-maven-3.6.3\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files (x86)\NetSarang\Xftp 7\;C:\Program Files\TortoiseSVN\bin;C:\dev\flutter\bin;C:\Users\lorenzo.digiacomo\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\lorenzo.digiacomo\AppData\Local\Programs\Python\Python311\;C:\Users\lorenzo.digiacomo\AppData\Local\Microsoft\WindowsApps;C:\Users\lorenzo.digiacomo\AppData\Local\GitHubDesktop\bin;C:\Users\lorenzo.digiacomo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\lorenzo.digiacomo\AppData\Roaming\npm;C:\dev\flutter\bin;
6
-
7
- Yarn version:
8
- 1.22.18
9
-
10
- Node version:
11
- 16.15.0
12
-
13
- Platform:
14
- win32 x64
15
-
16
- Trace:
17
- SyntaxError: C:\dev\GIT\TEMP\github\relay-forms\package.json: Unexpected string in JSON at position 991
18
- at JSON.parse (<anonymous>)
19
- at C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:1625:59
20
- at Generator.next (<anonymous>)
21
- at step (C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:310:30)
22
- at C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:321:13
23
-
24
- npm manifest:
1
+ Arguments:
2
+ C:\Program Files\nodejs\node.exe C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js fast:test
3
+
4
+ PATH:
5
+ C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\app\lorenzo.digiacomo\product\11.2.0\client_1\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\nodejs\;C:\gradle-5.6.4\bin;C:\apache-maven-3.6.3\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files (x86)\NetSarang\Xftp 7\;C:\Program Files\TortoiseSVN\bin;C:\dev\flutter\bin;C:\Users\lorenzo.digiacomo\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\lorenzo.digiacomo\AppData\Local\Programs\Python\Python311\;C:\Users\lorenzo.digiacomo\AppData\Local\Microsoft\WindowsApps;C:\Users\lorenzo.digiacomo\AppData\Local\GitHubDesktop\bin;C:\Users\lorenzo.digiacomo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\lorenzo.digiacomo\AppData\Roaming\npm;C:\dev\flutter\bin;
6
+
7
+ Yarn version:
8
+ 1.22.18
9
+
10
+ Node version:
11
+ 16.15.0
12
+
13
+ Platform:
14
+ win32 x64
15
+
16
+ Trace:
17
+ SyntaxError: C:\dev\GIT\TEMP\github\relay-forms\package.json: Unexpected string in JSON at position 991
18
+ at JSON.parse (<anonymous>)
19
+ at C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:1625:59
20
+ at Generator.next (<anonymous>)
21
+ at step (C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:310:30)
22
+ at C:\Users\lorenzo.digiacomo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:321:13
23
+
24
+ npm manifest:
25
25
  {
26
26
  "name": "react-relay-forms",
27
27
  "version": "1.0.1",
@@ -118,10 +118,10 @@ npm manifest:
118
118
  "@rollup/plugin-replace": "^2.3.3",
119
119
  "@rollup/plugin-babel": "5.2.2"
120
120
  }
121
- }
122
-
123
- yarn manifest:
124
- No manifest
125
-
126
- Lockfile:
127
- No lockfile
121
+ }
122
+
123
+ yarn manifest:
124
+ No manifest
125
+
126
+ Lockfile:
127
+ No lockfile