Skip to content

Commit 2ceb7d5

Browse files
authored
[SDK-697] Changes before publishing (#173)
* compiled * examples * package * index * index * 500 * 5 * . * .. * 10 * . * testser * .. * mini * megapush
1 parent 5d9d1ef commit 2ceb7d5

15 files changed

+488
-423
lines changed

.eslintrc.js

+61-71
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
module.exports = {
2+
/**
3+
* By default, ESLint expects ECMAScript 5 syntax. You can override that setting to enable support
4+
* for other ECMAScript versions as well as JSX by using parser options. However for IE9 compatibility
5+
* updating it to ECMAScript 6 or above is currently not permitted. -D
6+
* */
27
env: {
38
browser: true,
49
amd: true,
5-
commonjs: true,
6-
},
7-
extends: ["airbnb-base"],
8-
parserOptions: {
9-
ecmaVersion: 6,
10+
commonjs: true
1011
},
12+
extends: "airbnb/legacy",
1113
rules: {
1214
"prefer-arrow-callback": "off",
1315
"prefer-destructuring": "off",
@@ -37,131 +39,133 @@ module.exports = {
3739
"object-shorthand": "off",
3840
"block-spacing": [
3941
"error",
40-
"always",
42+
"always"
4143
],
4244
"brace-style": [
4345
"error",
44-
"stroustrup",
46+
"stroustrup"
4547
],
4648
"comma-spacing": [
4749
"error",
4850
{
4951
before: false,
50-
after: true,
51-
},
52+
after: true
53+
}
5254
],
5355
"comma-style": [
5456
"error",
55-
"last",
57+
"last"
5658
],
5759
"computed-property-spacing": [
5860
"error",
59-
"never",
61+
"never"
6062
],
6163
curly: [
6264
"error",
63-
"all",
65+
"all"
6466
],
6567
"eol-last": "off",
6668
"func-call-spacing": [
6769
"error",
68-
"never",
70+
"never"
6971
],
7072
indent: [
7173
"error",
72-
4,
74+
4
7375
],
7476
"key-spacing": [
7577
"error",
7678
{
7779
beforeColon: false,
78-
afterColon: true,
79-
},
80+
afterColon: true
81+
}
8082
],
8183
"keyword-spacing": [
8284
"error",
8385
{
8486
before: true,
85-
after: true,
86-
},
87+
after: true
88+
}
8789
],
8890
"lines-between-class-members": [
8991
"error",
90-
"always",
92+
"always"
9193
],
9294
"no-multi-spaces": [
93-
"error",
95+
"error"
9496
],
9597
"no-trailing-spaces": [
9698
"error",
9799
{
98-
ignoreComments: true,
99-
},
100+
ignoreComments: true
101+
}
100102
],
101103
"no-whitespace-before-property": [
102-
"error",
104+
"error"
103105
],
104106
"object-curly-newline": [
105107
"error",
106108
{
107109
multiline: true,
108-
consistent: true,
109-
},
110+
consistent: true
111+
}
110112
],
111113
"object-property-newline": [
112114
"error",
113115
{
114-
allowAllPropertiesOnSameLine: true,
115-
},
116+
allowAllPropertiesOnSameLine: true
117+
}
116118
],
117119
semi: [
118120
"error",
119-
"always",
121+
"always"
120122
],
121123
"semi-style": [
122124
"error",
123-
"last",
125+
"last"
124126
],
125127
"space-before-blocks": [
126128
"error",
127-
"always",
129+
"always"
128130
],
129131
"space-before-function-paren": [
130132
"error",
131-
"never",
133+
"never"
132134
],
133135
"space-in-parens": [
134136
"error",
135-
"never",
137+
"never"
136138
],
137139
"space-infix-ops": [
138-
"error",
140+
"error"
139141
],
140142
"space-unary-ops": [
141143
"error",
142144
{
143145
words: true,
144-
nonwords: false,
145-
},
146+
nonwords: false
147+
}
146148
],
147149
"switch-colon-spacing": [
148-
"error",
150+
"error"
149151
],
150152
"unicode-bom": [
151153
"error",
152-
"never",
154+
"never"
153155
],
154156
"linebreak-style": [
155157
"error",
156-
"unix",
158+
"unix"
157159
],
158160
"no-useless-escape": "off",
159-
quotes: "off",
161+
quotes: ["error",
162+
"double"
163+
],
160164
"valid-jsdoc": [
161165
"error",
162166
{
163-
requireReturn: false,
164-
},
167+
requireReturn: false
168+
}
165169
],
166170
"require-jsdoc": [
167171
"error",
@@ -171,55 +175,41 @@ module.exports = {
171175
MethodDefinition: true,
172176
ClassDeclaration: true,
173177
ArrowFunctionExpression: true,
174-
FunctionExpression: false,
175-
},
176-
},
178+
FunctionExpression: false
179+
}
180+
}
177181
],
178182
"no-console": [
179-
"error",
183+
"error"
180184
],
181185
"dot-notation": [
182-
"error",
186+
"error"
183187
],
184188
eqeqeq: [
185189
"error",
186-
"always",
190+
"always"
187191
],
188192
"no-alert": [
189-
"error",
193+
"error"
190194
],
191195
"no-caller": [
192-
"error",
196+
"error"
193197
],
194198
"no-eval": [
195-
"error",
199+
"error"
196200
],
197201
"no-extend-native": [
198-
"error",
202+
"error"
199203
],
200204
"no-iterator": [
201-
"error",
205+
"error"
202206
],
203207
"no-loop-func": [
204-
"error",
208+
"error"
205209
],
206210
"no-shadow": [
207-
"error",
208-
],
211+
"error"
212+
]
209213
},
210-
overrides: [
211-
{
212-
files: [
213-
"test/**/*.js",
214-
"webpack.config.js",
215-
],
216-
env: {
217-
es6: true,
218-
node: true,
219-
},
220-
rules: {
221-
"require-jsdoc": "off",
222-
},
223-
},
224-
],
225-
};
214+
215+
};

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/node_modules/
2-
.vscode/*
2+
.vscode/*
3+
package-lock.json
4+
__base64encode.csv

cypress/integration/events.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const timedEventObj = {
3434
},
3535
};
3636

37-
describe('Events tests ', () => {
38-
it('Checks if adding events works', () => {
37+
describe("Events tests ", () => {
38+
it("Checks if adding events works", () => {
3939
hp.haltAndClearStorage(() => {
4040
initMain();
4141
Countly.add_event(eventObj);
@@ -45,7 +45,7 @@ describe('Events tests ', () => {
4545
});
4646
});
4747
});
48-
it('Checks if timed events works', () => {
48+
it("Checks if timed events works", () => {
4949
hp.haltAndClearStorage(() => {
5050
initMain();
5151
// start the timer

cypress/integration/internal_limits.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ const error = {
3131
stack: "Lorem ipsum dolor sit amet,\n consectetur adipiscing elit, sed do eiusmod tempor\n incididunt ut labore et dolore magna\n aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n Duis aute irure dolor in reprehenderit in voluptate\n velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia\n deserunt mollit anim id\n est laborum.",
3232
};
3333
const bread = {
34-
one: 'log1',
35-
two: 'log2',
36-
three: 'log3',
37-
four: 'log4',
38-
five: 'log5 too many',
39-
six: 'log6',
40-
seven: 'log7',
34+
one: "log1",
35+
two: "log2",
36+
three: "log3",
37+
four: "log4",
38+
five: "log5 too many",
39+
six: "log6",
40+
seven: "log7",
4141
};
4242
const customEvent = {
4343
key: "Enter your key here",
@@ -84,8 +84,8 @@ const customProperties = {
8484
pull: ["gender", "III Fernando Valdez"],
8585
};
8686

87-
describe('Internal limit tests ', () => {
88-
it('Checks if custom event limits works', () => {
87+
describe("Internal limit tests ", () => {
88+
it("Checks if custom event limits works", () => {
8989
hp.haltAndClearStorage(() => {
9090
initMain();
9191
Countly.add_event(customEvent);
@@ -95,7 +95,7 @@ describe('Internal limit tests ', () => {
9595
});
9696
});
9797
});
98-
it('Checks if view event limits works', () => {
98+
it("Checks if view event limits works", () => {
9999
hp.haltAndClearStorage(() => {
100100
initMain();
101101
Countly.track_pageview(viewName);
@@ -105,7 +105,7 @@ describe('Internal limit tests ', () => {
105105
});
106106
});
107107
});
108-
it('Checks if view event limits works', () => {
108+
it("Checks if view event limits works", () => {
109109
hp.haltAndClearStorage(() => {
110110
initMain();
111111
Countly.add_log(bread.one);
@@ -122,7 +122,7 @@ describe('Internal limit tests ', () => {
122122
});
123123
});
124124
});
125-
it('Checks if user detail limits works', () => {
125+
it("Checks if user detail limits works", () => {
126126
hp.haltAndClearStorage(() => {
127127
initMain();
128128
Countly.user_details(userDetail);
@@ -132,7 +132,7 @@ describe('Internal limit tests ', () => {
132132
});
133133
});
134134
});
135-
it('Checks if custom property limits works', () => {
135+
it("Checks if custom property limits works", () => {
136136
hp.haltAndClearStorage(() => {
137137
initMain();
138138
Countly.userData.set(customProperties.set[0], customProperties.set[1]); // set custom property

cypress/integration/sessions.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ function initMain() {
1212
}
1313
const dummyQueue = [{ begin_session: 1, metrics: "{\"_app_version\":\"0.0\",\"_ua\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0\",\"_resolution\":\"1568x882\",\"_density\":1.2244897959183674,\"_locale\":\"en-US\"}", app_key: "YOUR_APP_KEY", device_id: "55669b9b-f9d7-4ed5-bc77-ec5ebb65ddd8", sdk_name: "javascript_native_web", sdk_version: "21.11.0", timestamp: 1644909864950, hour: 10, dow: 2 }, { events: "[{\"key\":\"[CLY]_orientation\",\"count\":1,\"segmentation\":{\"mode\":\"portrait\"},\"timestamp\":1644909864949,\"hour\":10,\"dow\":2}]", app_key: "YOUR_APP_KEY", device_id: "55669b9b-f9d7-4ed5-bc77-ec5ebb65ddd8", sdk_name: "javascript_native_web", sdk_version: "21.11.0", timestamp: 1644909864958, hour: 10, dow: 2 }, { session_duration: 4, app_key: "YOUR_APP_KEY", device_id: "55669b9b-f9d7-4ed5-bc77-ec5ebb65ddd8", sdk_name: "javascript_native_web", sdk_version: "21.11.0", timestamp: 1644909868015, hour: 10, dow: 2 }, { end_session: 1, session_duration: 10, app_key: "YOUR_APP_KEY", device_id: "55669b9b-f9d7-4ed5-bc77-ec5ebb65ddd8", sdk_name: "javascript_native_web", sdk_version: "21.11.0", timestamp: 1644909869459, hour: 10, dow: 2 }];
1414

15-
describe('Session tests ', () => {
16-
it('Checks if session start, extension and ending works with a dummy queue', () => {
15+
describe("Session tests ", () => {
16+
it("Checks if session start, extension and ending works with a dummy queue", () => {
1717
hp.haltAndClearStorage(() => {
1818
// initialize countly
1919
initMain();
@@ -33,7 +33,7 @@ describe('Session tests ', () => {
3333
});
3434
});
3535
});
36-
it('Checks if session start, extension and ending works', () => {
36+
it("Checks if session start, extension and ending works", () => {
3737
hp.haltAndClearStorage(() => {
3838
// initialize countly
3939
initMain();

cypress/integration/user_details.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const userDetailObj = {
2626
},
2727
};
2828

29-
describe('User details tests ', () => {
30-
it('Checks if user detail recording works', () => {
29+
describe("User details tests ", () => {
30+
it("Checks if user detail recording works", () => {
3131
hp.haltAndClearStorage(() => {
3232
initMain();
3333
Countly.user_details(userDetailObj);

0 commit comments

Comments
 (0)