Skip to content

Commit 0fc9a29

Browse files
committed
Update dependencies.
1 parent ed66f2d commit 0fc9a29

13 files changed

+2630
-4040
lines changed

.eslintrc

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,5 @@
1111
"es6": true,
1212
"jest": true,
1313
"node": true
14-
},
15-
"rules": {
16-
"camelcase": [2, { "properties": "always" }],
17-
"indent": [2, 2, { "SwitchCase": 1 }], // 2 spaces indentation
18-
"semi": [2, "always"],
19-
"keyword-spacing": [2],
20-
"space-before-function-paren": [
21-
2,
22-
{
23-
"anonymous": "always",
24-
"named": "never",
25-
"asyncArrow": "always"
26-
}
27-
],
28-
"space-before-blocks": [2, "always"],
29-
"space-infix-ops": [2, { "int32Hint": false }],
30-
"quotes": [1, "single", "avoid-escape"],
31-
"max-len": [
32-
2,
33-
100,
34-
4,
35-
{
36-
"ignoreUrls": true,
37-
"ignorePattern": "^(\\s*(var|let|const)\\s.+=\\s*require\\s*\\()|(^\\s*import)"
38-
}
39-
],
40-
"no-multi-str": 0,
41-
"eqeqeq": [2, "allow-null"],
42-
"strict": [2, "global"],
43-
"no-nested-ternary": [2],
44-
"no-underscore-dangle": 0,
45-
"comma-style": [2],
46-
"one-var": [2, "never"],
47-
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
48-
"consistent-this": [0, "self"],
49-
"spaced-comment": ["error", "always", { "exceptions": ["*"] }]
5014
}
5115
}

package-lock.json

Lines changed: 2472 additions & 3829 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,28 @@
3434
"url": "[email protected]:adobe/reactor-turbine-edge.git"
3535
},
3636
"devDependencies": {
37-
"@rollup/plugin-commonjs": "^15.1.0",
38-
"@rollup/plugin-node-resolve": "^9.0.0",
39-
"@testing-library/jest-dom": "^5.11.4",
37+
"@rollup/plugin-commonjs": "^19.0.0",
38+
"@rollup/plugin-node-resolve": "^13.0.0",
39+
"@testing-library/jest-dom": "^5.14.1",
4040
"camelize": "1.0.0",
4141
"cli-watch": "^1.0.7",
42-
"eslint": "^7.10.0",
43-
"eslint-config-airbnb-base": "^14.2.0",
44-
"eslint-config-prettier": "^6.12.0",
45-
"eslint-plugin-jest-dom": "^3.2.3",
46-
"eslint-plugin-import": "^2.22.1",
47-
"eslint-plugin-prettier": "^3.1.4",
48-
"eslint-plugin-testing-library": "^3.9.0",
42+
"eslint": "^7.29.0",
43+
"eslint-config-airbnb-base": "^14.2.1",
44+
"eslint-config-prettier": "^8.3.0",
45+
"eslint-plugin-import": "^2.23.4",
46+
"eslint-plugin-jest-dom": "^3.9.0",
47+
"eslint-plugin-prettier": "^3.4.0",
48+
"eslint-plugin-testing-library": "^4.6.0",
49+
"husky": "^6.0.0",
4950
"inject-loader": "^4.0.1",
50-
"husky": "^4.3.0",
51-
"jest": "^26.4.2",
52-
"jest-runner-eslint": "^0.10.0",
53-
"lint-staged": "^10.4.0",
54-
"kebab-case": "1.0.0",
55-
"prettier": "^2.1.2",
56-
"pretty-quick": "^3.0.2",
51+
"jest": "^27.0.5",
52+
"jest-runner-eslint": "^0.10.1",
53+
"kebab-case": "1.0.1",
54+
"lint-staged": "^11.0.0",
55+
"prettier": "^2.3.1",
56+
"pretty-quick": "^3.1.1",
5757
"proxyquire": "^2.1.3",
58-
"rollup": "^2.28.2",
59-
"terser": "^5.3.3"
58+
"rollup": "^2.52.2",
59+
"terser": "^5.7.0"
6060
}
6161
}

src/__tests__/createGetDataElementValue.test.js

Lines changed: 27 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ const createGetDataElementValue = (
3636
createGetDataElementDefinition = createGetDataElementDefinitionDefault
3737
} = {}
3838
) => {
39-
const getDataElementDefinition = createGetDataElementDefinition(
40-
delegateDefinition
41-
);
39+
const getDataElementDefinition =
40+
createGetDataElementDefinition(delegateDefinition);
4241

4342
return createGetDataElementValueModule(
4443
moduleProvider,
@@ -54,10 +53,9 @@ describe('function returned by createGetDataElementValue', () => {
5453
}
5554
});
5655

57-
return getDataElementValue(
58-
'testDataElement',
59-
defaultContext
60-
).then((dataElementValue) => expect(dataElementValue).toBe('bar'));
56+
return getDataElementValue('testDataElement', defaultContext).then(
57+
(dataElementValue) => expect(dataElementValue).toBe('bar')
58+
);
6159
});
6260

6361
test('returns a value from the contextData object as value', () => {
@@ -78,10 +76,9 @@ describe('function returned by createGetDataElementValue', () => {
7876
{ moduleProvider }
7977
);
8078

81-
return getDataElementValue(
82-
'testDataElement',
83-
context
84-
).then((dataElementValue) => expect(dataElementValue).toBe('bar'));
79+
return getDataElementValue('testDataElement', context).then(
80+
(dataElementValue) => expect(dataElementValue).toBe('bar')
81+
);
8582
});
8683

8784
test('cleans the value when cleanText = true', () => {
@@ -90,10 +87,9 @@ describe('function returned by createGetDataElementValue', () => {
9087
settings: { foo: 'bar' }
9188
});
9289

93-
return getDataElementValue(
94-
'testDataElement',
95-
defaultContext
96-
).then((dataElementValue) => expect(dataElementValue).toBe('cleaned:bar'));
90+
return getDataElementValue('testDataElement', defaultContext).then(
91+
(dataElementValue) => expect(dataElementValue).toBe('cleaned:bar')
92+
);
9793
});
9894

9995
[undefined, null].forEach((testDataElementValue) => {
@@ -110,11 +106,8 @@ describe('function returned by createGetDataElementValue', () => {
110106
moduleProvider
111107
);
112108

113-
return getDataElementValue(
114-
'testDataElement',
115-
defaultContext
116-
).then((dataElementValue) =>
117-
expect(dataElementValue).toBe('defaultValue')
109+
return getDataElementValue('testDataElement', defaultContext).then(
110+
(dataElementValue) => expect(dataElementValue).toBe('defaultValue')
118111
);
119112
});
120113

@@ -127,11 +120,9 @@ describe('function returned by createGetDataElementValue', () => {
127120
{ moduleProvider }
128121
);
129122

130-
return getDataElementValue(
131-
'testDataElement',
132-
defaultContext
133-
).then((dataElementValue) =>
134-
expect(dataElementValue).toBe(testDataElementValue)
123+
return getDataElementValue('testDataElement', defaultContext).then(
124+
(dataElementValue) =>
125+
expect(dataElementValue).toBe(testDataElementValue)
135126
);
136127
});
137128
});
@@ -150,11 +141,9 @@ describe('function returned by createGetDataElementValue', () => {
150141
{ moduleProvider }
151142
);
152143

153-
return getDataElementValue(
154-
'testDataElement',
155-
defaultContext
156-
).then((dataElementValue) =>
157-
expect(dataElementValue).toBe(testDataElementValue)
144+
return getDataElementValue('testDataElement', defaultContext).then(
145+
(dataElementValue) =>
146+
expect(dataElementValue).toBe(testDataElementValue)
158147
);
159148
});
160149
});
@@ -167,10 +156,9 @@ describe('function returned by createGetDataElementValue', () => {
167156
}
168157
});
169158

170-
return getDataElementValue(
171-
'testDataElement',
172-
defaultContext
173-
).then((dataElementValue) => expect(dataElementValue).toBe('bar'));
159+
return getDataElementValue('testDataElement', defaultContext).then(
160+
(dataElementValue) => expect(dataElementValue).toBe('bar')
161+
);
174162
});
175163

176164
test('lowercases the default value if forceLowerCase = true', () => {
@@ -180,10 +168,9 @@ describe('function returned by createGetDataElementValue', () => {
180168
settings: {}
181169
});
182170

183-
return getDataElementValue(
184-
'testDataElement',
185-
defaultContext
186-
).then((dataElementValue) => expect(dataElementValue).toBe('bar'));
171+
return getDataElementValue('testDataElement', defaultContext).then(
172+
(dataElementValue) => expect(dataElementValue).toBe('bar')
173+
);
187174
});
188175

189176
test('throws an error when calling data element module exports fails', () => {
@@ -228,8 +215,8 @@ describe('function returned by createGetDataElementValue', () => {
228215
})
229216
.catch((e) => {
230217
expect(e.message).toMatch(
231-
'Failed to execute module for data element "testDataElement". \
232-
noob tried to divide by zero'
218+
'Failed to execute module for data element "testDataElement". ' +
219+
'noob tried to divide by zero'
233220
);
234221
});
235222
});

src/__tests__/createGetDataElementValues.test.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ const getDataElementValue = jest.fn((v) => `resolved:${v}`);
1515

1616
describe('function returned by createGetDataElementValues', () => {
1717
test('returns another function that will return data element values when it is called', () => {
18-
const getDataElementValues = createGetDataElementValues(
19-
getDataElementValue
20-
);
18+
const getDataElementValues =
19+
createGetDataElementValues(getDataElementValue);
2120

2221
return getDataElementValues(['de1'], {}).then(
2322
(getResolvedDataElementValue) => {
@@ -27,9 +26,8 @@ describe('function returned by createGetDataElementValues', () => {
2726
});
2827

2928
test('adds a dataElementCallStack to the context if it does not exist', () => {
30-
const getDataElementValues = createGetDataElementValues(
31-
getDataElementValue
32-
);
29+
const getDataElementValues =
30+
createGetDataElementValues(getDataElementValue);
3331

3432
const context = {};
3533
return getDataElementValues(['de1'], context).then(() => {
@@ -38,9 +36,8 @@ describe('function returned by createGetDataElementValues', () => {
3836
});
3937

4038
test('sends context to getDataElementValue', () => {
41-
const getDataElementValues = createGetDataElementValues(
42-
getDataElementValue
43-
);
39+
const getDataElementValues =
40+
createGetDataElementValues(getDataElementValue);
4441

4542
const context = { a: 1, dataElementCallStack: [1] };
4643
return getDataElementValues(['de1'], context).then(() => {

src/__tests__/createModuleProvider.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ describe('createModuleProvider', () => {
7777
);
7878
}).toThrowError(
7979
new Error(
80-
'Failed to access module "anotherExtension/src/lib/dataElements/path.js". \
81-
Cannot read property \'script\' of undefined'
80+
'Failed to access module "anotherExtension/src/lib/dataElements/path.js". ' +
81+
"Cannot read property 'script' of undefined"
8282
)
8383
);
8484
});

src/__tests__/getRuleFetchFn.test.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ governing permissions and limitations under the License.
1212
const getRuleFetchFn = require('../getRuleFetchFn');
1313
const createNewLogger = require('../createNewLogger');
1414

15-
const createFakeFetch = (returnStatus = 200) => (resource) =>
16-
Promise.resolve({
17-
clone: () => ({
15+
const createFakeFetch =
16+
(returnStatus = 200) =>
17+
(resource) =>
18+
Promise.resolve({
19+
clone: () => ({
20+
arrayBuffer: () => Promise.resolve(`${resource}:arrayBuffer`),
21+
status: returnStatus
22+
}),
1823
arrayBuffer: () => Promise.resolve(`${resource}:arrayBuffer`),
1924
status: returnStatus
20-
}),
21-
arrayBuffer: () => Promise.resolve(`${resource}:arrayBuffer`),
22-
status: returnStatus
23-
});
25+
});
2426

2527
describe('getRuleFetchFn', () => {
2628
test('returns a function that will make a successful fetch and returns the response', () => {

0 commit comments

Comments
 (0)