Skip to content

Commit db5f591

Browse files
Merge pull request #132 from skyflowapi/release/26.3.13
Release/26.3.13 - SK-2612: add cspell as spellcheck for react-native sdk
2 parents 8e2b2f1 + da1ef51 commit db5f591

File tree

29 files changed

+564
-83
lines changed

29 files changed

+564
-83
lines changed

.cspell.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"allowCompoundWords": true,
5+
"words": [
6+
"Skyflow",
7+
"de-identify",
8+
"re-identify",
9+
"deidentify",
10+
"reidentify",
11+
"De-identify",
12+
"Re-identify",
13+
"Deidentify",
14+
"Reidentify",
15+
"detokenize",
16+
"Detokenize",
17+
"detokenization",
18+
"de-identified",
19+
"DEIDENTIFIED",
20+
"de-identification",
21+
"de-identifying",
22+
"re-identified",
23+
"Re-identified",
24+
"re-identification",
25+
"Blackbox",
26+
"FORMDATA",
27+
"typeof",
28+
"Cobranded",
29+
"HIPERCARD",
30+
"UNIONPAY",
31+
"BANCAIRES",
32+
"CARTES",
33+
"MAESTRO",
34+
"vaultID",
35+
"skyflowID",
36+
"cardholder",
37+
"CARDHOLDER",
38+
"podspec",
39+
"Podfile",
40+
"gradlew",
41+
"VAULTURL",
42+
"PUREJS",
43+
"APPLICATIONORJSON",
44+
"TEXTORPLAIN",
45+
"TEXTORXML",
46+
"FORMURLENCODED",
47+
"keyify",
48+
"isvalid",
49+
"cardnumber",
50+
"alttext",
51+
"fullname",
52+
"revealerror",
53+
"iamurl",
54+
"Luhn",
55+
"banceris",
56+
"carter",
57+
"gduye",
58+
"rdsbe",
59+
"ZSAE",
60+
"XZYXX",
61+
"gphone",
62+
"myname",
63+
"recordss",
64+
"inputfield",
65+
"showlist",
66+
"Showlist",
67+
"iframes"
68+
],
69+
"ignorePaths": [
70+
"node_modules/**",
71+
"dist/**",
72+
"build/**",
73+
"lib/**",
74+
"coverage/**",
75+
"*.log",
76+
"package-lock.json",
77+
"yarn.lock",
78+
".git/**",
79+
"android/**",
80+
"ios/**",
81+
"example/node_modules/**",
82+
"example/android/**",
83+
"example/ios/**",
84+
"*.podspec",
85+
"Podfile",
86+
"*.gradle",
87+
"gradlew",
88+
"*.pbxproj"
89+
],
90+
"ignoreRegExpList": [
91+
"/\\b[A-Z0-9]{20,}\\b/g",
92+
"/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi",
93+
"/\\b[A-Za-z0-9_]{7,}\\b(?=])/g"
94+
]
95+
}

.github/workflows/CI.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
- name: install node_modules
3232
run: npm install
3333

34+
- name: Run spellcheck
35+
run: npm run spellcheck
36+
3437
- name: Run tests
3538
run: npm run test
3639

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ All notable changes to this project will be documented in this file.
3636
- Added Asterisk symbol for label of required collect element.
3737
- `requiredAsterisk` custom styles to collect element labelStyles.
3838
### Changed
39-
- OnFoucs of invalid collect element, removed errorText.
39+
- OnFocus of invalid collect element, removed errorText.
4040
## [1.0.1] - 2022-11-01
4141

4242
### Changed
@@ -47,4 +47,4 @@ All notable changes to this project will be documented in this file.
4747

4848
## [1.0.0] - 2022-10-11
4949

50-
- Inital Skyflow React Native SDK release
50+
- Initial Skyflow React Native SDK release

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The following `props` can be passed to Skyflow Collection Element:
155155

156156
``` javascript
157157
{
158-
conatiner: 'CollectContainer' // Required, the collect container.
158+
container: 'CollectContainer' // Required, the collect container.
159159
table: 'string', // Required, the table this data belongs to.
160160
column: 'string', // Required, the column into which this data should be inserted.
161161
label: 'string', // Optional, label for the form element.
@@ -590,7 +590,7 @@ The following `props` can be passed to Skyflow Collection Element:
590590

591591
``` javascript
592592
{
593-
conatiner: 'CollectContainer' // Required, the collect container.
593+
container: 'CollectContainer' // Required, the collect container.
594594
table: 'string', // Required, the table this data belongs to.
595595
column: 'string', // Required, the column into which this data should be inserted.
596596
label: 'string', // Optional, label for the form element.
@@ -1421,7 +1421,7 @@ For non-PCI use-cases, retrieving data from the vault and revealing it in the mo
14211421
"table": String, // name of table from where records are to be fetched
14221422
"redaction": RedactionType, // redaction to be applied to retrieved data
14231423
"columnName": String, // a unique column name
1424-
"colunmnValues": Array // Array of Column Values of the records to be fetched
1424+
"columnValues": Array // Array of Column Values of the records to be fetched
14251425
}
14261426
]
14271427
}

__tests__/components/components.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const onBlurMock = jest.fn();
3535
const onFocusMock = jest.fn();
3636

3737
const changeTrigger = jest.fn();
38-
const foucsTrigger = jest.fn();
38+
const focusTrigger = jest.fn();
3939
const blurTrigger = jest.fn();
4040

4141
describe('test Collect Elements Components', () => {
@@ -47,7 +47,7 @@ describe('test Collect Elements Components', () => {
4747
jest.spyOn(collectContainer, 'create').mockImplementation(() => ({
4848
getClientState: () => ({}),
4949
onChangeElement: changeTrigger,
50-
onFocusElement: foucsTrigger,
50+
onFocusElement: focusTrigger,
5151
onBlurElement: blurTrigger,
5252
updateLabelStyles: jest.fn(),
5353
updateInputStyles: jest.fn(),
@@ -84,7 +84,7 @@ describe('test Collect Elements Components', () => {
8484
expect(changeTrigger).toBeCalledWith('hello');
8585

8686
fireEvent(textField, 'focus');
87-
expect(foucsTrigger).toBeCalled();
87+
expect(focusTrigger).toBeCalled();
8888

8989
fireEvent(textField, 'blur');
9090
expect(blurTrigger).toBeCalled();
@@ -146,7 +146,7 @@ describe('test Collect Elements Components', () => {
146146
expect(changeTrigger).toBeCalledWith('1234');
147147

148148
fireEvent(textField, 'focus');
149-
expect(foucsTrigger).toBeCalled();
149+
expect(focusTrigger).toBeCalled();
150150

151151
fireEvent(textField, 'blur');
152152
expect(blurTrigger).toBeCalled();
@@ -204,7 +204,7 @@ describe('test Collect Elements Components', () => {
204204
expect(changeTrigger).toBeCalledWith('123');
205205

206206
fireEvent(textField, 'focus');
207-
expect(foucsTrigger).toBeCalled();
207+
expect(focusTrigger).toBeCalled();
208208

209209
fireEvent(textField, 'blur');
210210
expect(blurTrigger).toBeCalled();
@@ -262,7 +262,7 @@ describe('test Collect Elements Components', () => {
262262
expect(changeTrigger).toBeCalledWith('test');
263263

264264
fireEvent(textField, 'focus');
265-
expect(foucsTrigger).toBeCalled();
265+
expect(focusTrigger).toBeCalled();
266266

267267
fireEvent(textField, 'blur');
268268
expect(blurTrigger).toBeCalled();
@@ -324,7 +324,7 @@ describe('test Collect Elements Components', () => {
324324
expect(changeTrigger).toBeCalledWith('4111111111111111');
325325

326326
fireEvent(textField, 'focus');
327-
expect(foucsTrigger).toBeCalled();
327+
expect(focusTrigger).toBeCalled();
328328

329329
fireEvent(textField, 'blur');
330330
expect(blurTrigger).toBeCalled();
@@ -394,7 +394,7 @@ describe('test Collect Elements Components', () => {
394394
expect(changeTrigger).toBeCalledWith('12/2032');
395395

396396
fireEvent(textField, 'focus');
397-
expect(foucsTrigger).toBeCalled();
397+
expect(focusTrigger).toBeCalled();
398398

399399
fireEvent(textField, 'blur');
400400
expect(blurTrigger).toBeCalled();
@@ -458,7 +458,7 @@ describe('test Collect Elements Components', () => {
458458
expect(changeTrigger).toBeCalledWith('12');
459459

460460
fireEvent(textField, 'focus');
461-
expect(foucsTrigger).toBeCalled();
461+
expect(focusTrigger).toBeCalled();
462462

463463
fireEvent(textField, 'blur');
464464
expect(blurTrigger).toBeCalled();
@@ -521,7 +521,7 @@ describe('test Collect Elements Components', () => {
521521
expect(changeTrigger).toBeCalledWith('2032');
522522

523523
fireEvent(textField, 'focus');
524-
expect(foucsTrigger).toBeCalled();
524+
expect(focusTrigger).toBeCalled();
525525

526526
fireEvent(textField, 'blur');
527527
expect(blurTrigger).toBeCalled();

__tests__/core-utils/collect.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('test collect utils class', () => {
103103
});
104104
});
105105

106-
it('test tokenize with addtional fields', (done) => {
106+
it('test tokenize with additional fields', (done) => {
107107
const successResponse = {
108108
responses: [
109109
{ records: [{ skyflow_id: 'test_skyflow_id' }] },
@@ -268,7 +268,7 @@ describe('test collect utils class', () => {
268268
});
269269
});
270270

271-
it('test tokenize with addtional fields duplicate columns', (done) => {
271+
it('test tokenize with additional fields duplicate columns', (done) => {
272272
const testSkyflowClient = new Skyflow({
273273
vaultID: '1234',
274274
vaultURL: 'https://url.com',

__tests__/core-utils/element-validations.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('test validateUpsertOptions', () => {
9494
}
9595
});
9696

97-
it('should throw error for inavlid upsert object type', () => {
97+
it('should throw error for invalid upsert object type', () => {
9898
try {
9999
validateUpsertOptions([true, 123]);
100100
} catch (err) {
@@ -181,7 +181,7 @@ describe('test validatePin function', () => {
181181
expect(validatePin('1234')).toBe(true);
182182
expect(validatePin('123456789')).toBe(true);
183183
});
184-
it('should return true for value length outof range', () => {
184+
it('should return true for value length out of range', () => {
185185
expect(validatePin('12')).toBe(false);
186186
expect(validatePin('12345678901234677')).toBe(false);
187187
});
@@ -710,7 +710,7 @@ describe('test validateGetInput', () => {
710710
records: [
711711
{
712712
columnValues: [],
713-
columnName: 'cloumn',
713+
columnName: 'column',
714714
table: 'test',
715715
redaction: RedactionType.PLAIN_TEXT,
716716
},

__tests__/core-utils/reveal.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ describe('fetchRecordGET fn test', () => {
570570
});
571571
});
572572

573-
it('should give success reponse in case of success', (done) => {
573+
it('should give success response in case of success', (done) => {
574574
jest.spyOn(ClientModule, 'default').mockImplementation(() => ({
575575
request: () => Promise.resolve(getSuccessResponse),
576576
}));

__tests__/core/CollectContainer.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jest.mock('../../src/core-utils/collect', () => ({
2020
__esModule: true,
2121
tokenize: jest.fn(),
2222
}));
23-
describe('test CollectConatiner Class', () => {
23+
describe('test CollectContainer Class', () => {
2424
let collectContainer;
2525
beforeEach(() => {
2626
collectContainer = new CollectContainer(testSkyflowClient);

__tests__/core/RevealContainer.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const testSkyflowClient = new Skyflow({
1313
getBearerToken: () => Promise.resolve('valid_auth_token'),
1414
});
1515

16-
describe('test RevealConatiner Class', () => {
16+
describe('test RevealContainer Class', () => {
1717
let revealContainer;
1818
beforeEach(() => {
1919
revealContainer = new RevealContainer(testSkyflowClient);
@@ -75,7 +75,7 @@ describe('test RevealConatiner Class', () => {
7575
});
7676
revealElement2.setMethods(setValueMock2, setErrorMock2);
7777

78-
const revealFailedVaule = {
78+
const revealFailedValue = {
7979
records: [
8080
{
8181
token: 'random_token',
@@ -96,7 +96,7 @@ describe('test RevealConatiner Class', () => {
9696
};
9797
jest
9898
.spyOn(revealUtils, 'fetchRecordsByTokenId')
99-
.mockRejectedValue(revealFailedVaule);
99+
.mockRejectedValue(revealFailedValue);
100100

101101
revealContainer
102102
.reveal()
@@ -111,7 +111,7 @@ describe('test RevealConatiner Class', () => {
111111
expect(setValueMock2).toBeCalledTimes(0);
112112
expect(err).toEqual({
113113
success: [{ token: 'random_token', valueType: 'STRING' }],
114-
errors: revealFailedVaule.errors,
114+
errors: revealFailedValue.errors,
115115
});
116116
done();
117117
} catch (error) {

0 commit comments

Comments
 (0)