Skip to content

Commit 71eb0bc

Browse files
linting
1 parent 8a391e7 commit 71eb0bc

File tree

4 files changed

+40
-20
lines changed

4 files changed

+40
-20
lines changed

react_on_rails_pro/packages/node-renderer/tests/fixtures/bundle.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ const { PassThrough } = require('stream');
22

33
global.ReactOnRails = {
44
dummy: { html: 'Dummy Object' },
5-
5+
66
// Get or create async value promise
7-
getAsyncValue: function() {
7+
getAsyncValue: function () {
88
debugger;
99
if (!sharedExecutionContext.has('asyncPromise')) {
1010
const promiseData = {};
@@ -17,28 +17,28 @@ global.ReactOnRails = {
1717
}
1818
return sharedExecutionContext.get('asyncPromise').promise;
1919
},
20-
20+
2121
// Resolve the async value promise
22-
setAsyncValue: function(value) {
22+
setAsyncValue: function (value) {
2323
debugger;
2424
if (!sharedExecutionContext.has('asyncPromise')) {
2525
ReactOnRails.getAsyncValue();
2626
}
2727
const promiseData = sharedExecutionContext.get('asyncPromise');
2828
promiseData.resolve(value);
2929
},
30-
30+
3131
// Get or create stream
32-
getStreamValues: function() {
32+
getStreamValues: function () {
3333
if (!sharedExecutionContext.has('stream')) {
3434
const stream = new PassThrough();
3535
sharedExecutionContext.set('stream', { stream });
3636
}
3737
return sharedExecutionContext.get('stream').stream;
3838
},
39-
39+
4040
// Add value to stream
41-
addStreamValue: function(value) {
41+
addStreamValue: function (value) {
4242
if (!sharedExecutionContext.has('stream')) {
4343
// Create the stream first if it doesn't exist
4444
ReactOnRails.getStreamValues();
@@ -48,7 +48,7 @@ global.ReactOnRails = {
4848
return value;
4949
},
5050

51-
endStream: function() {
51+
endStream: function () {
5252
if (sharedExecutionContext.has('stream')) {
5353
const { stream } = sharedExecutionContext.get('stream');
5454
stream.end();

react_on_rails_pro/packages/node-renderer/tests/fixtures/secondary-bundle.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
global.ReactOnRails = {
22
dummy: { html: 'Dummy Object from secondary bundle' },
3-
4-
3+
54
// Get or create async value promise
6-
getAsyncValue: function() {
5+
getAsyncValue: function () {
76
if (!sharedExecutionContext.has('secondaryAsyncPromise')) {
87
const promiseData = {};
98
const promise = new Promise((resolve, reject) => {
@@ -15,27 +14,27 @@ global.ReactOnRails = {
1514
}
1615
return sharedExecutionContext.get('secondaryAsyncPromise').promise;
1716
},
18-
17+
1918
// Resolve the async value promise
20-
setAsyncValue: function(value) {
19+
setAsyncValue: function (value) {
2120
if (!sharedExecutionContext.has('secondaryAsyncPromise')) {
2221
ReactOnRails.getAsyncValue();
2322
}
2423
const promiseData = sharedExecutionContext.get('secondaryAsyncPromise');
2524
promiseData.resolve(value);
2625
},
27-
26+
2827
// Get or create stream
29-
getStreamValues: function() {
28+
getStreamValues: function () {
3029
if (!sharedExecutionContext.has('secondaryStream')) {
3130
const stream = new PassThrough();
3231
sharedExecutionContext.set('secondaryStream', { stream });
3332
}
3433
return sharedExecutionContext.get('secondaryStream').stream;
3534
},
36-
35+
3736
// Add value to stream
38-
addStreamValue: function(value) {
37+
addStreamValue: function (value) {
3938
if (!sharedExecutionContext.has('secondaryStream')) {
4039
// Create the stream first if it doesn't exist
4140
ReactOnRails.getStreamValues();
@@ -44,7 +43,7 @@ global.ReactOnRails = {
4443
stream.write(value);
4544
},
4645

47-
endStream: function() {
46+
endStream: function () {
4847
if (sharedExecutionContext.has('secondaryStream')) {
4948
const { stream } = sharedExecutionContext.get('secondaryStream');
5049
stream.end();

react_on_rails_pro/packages/node-renderer/tests/worker.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,11 @@ describe('worker', () => {
483483

484484
// Verify bundles are placed in their correct directories
485485
const bundle1Path = path.join(serverBundleCachePathForTest(), bundleHash, `${bundleHash}.js`);
486-
const bundle2Path = path.join(serverBundleCachePathForTest(), secondaryBundleHash, `${secondaryBundleHash}.js`);
486+
const bundle2Path = path.join(
487+
serverBundleCachePathForTest(),
488+
secondaryBundleHash,
489+
`${secondaryBundleHash}.js`,
490+
);
487491
expect(fs.existsSync(bundle1Path)).toBe(true);
488492
expect(fs.existsSync(bundle2Path)).toBe(true);
489493

react_on_rails_pro/spec/dummy/Gemfile.lock

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ PATH
2222
specs:
2323
react_on_rails_pro (16.2.0.beta.4)
2424
addressable
25+
async (>= 2.6)
2526
connection_pool
2627
execjs (~> 2.9)
2728
httpx (~> 1.5)
@@ -107,6 +108,12 @@ GEM
107108
public_suffix (>= 2.0.2, < 7.0)
108109
amazing_print (1.6.0)
109110
ast (2.4.2)
111+
async (2.34.0)
112+
console (~> 1.29)
113+
fiber-annotation
114+
io-event (~> 1.11)
115+
metrics (~> 0.12)
116+
traces (~> 0.18)
110117
base64 (0.2.0)
111118
benchmark (0.4.0)
112119
bigdecimal (3.1.9)
@@ -131,6 +138,10 @@ GEM
131138
coderay (1.1.3)
132139
concurrent-ruby (1.3.5)
133140
connection_pool (2.5.0)
141+
console (1.34.2)
142+
fiber-annotation
143+
fiber-local (~> 1.1)
144+
json
134145
coveralls (0.8.23)
135146
json (>= 1.8, < 3)
136147
simplecov (~> 0.16.1)
@@ -165,6 +176,9 @@ GEM
165176
ffi (1.17.0-x86_64-darwin)
166177
ffi (1.17.0-x86_64-linux-gnu)
167178
ffi (1.17.0-x86_64-linux-musl)
179+
fiber-annotation (0.2.0)
180+
fiber-local (1.1.0)
181+
fiber-storage
168182
fiber-storage (1.0.0)
169183
generator_spec (0.10.0)
170184
activesupport (>= 3.0.0)
@@ -184,6 +198,7 @@ GEM
184198
i18n (1.14.7)
185199
concurrent-ruby (~> 1.0)
186200
io-console (0.8.0)
201+
io-event (1.14.0)
187202
irb (1.15.1)
188203
pp (>= 0.6.0)
189204
rdoc (>= 4.0.0)
@@ -216,6 +231,7 @@ GEM
216231
marcel (1.0.4)
217232
matrix (0.4.2)
218233
method_source (1.1.0)
234+
metrics (0.15.0)
219235
mini_mime (1.1.5)
220236
mini_portile2 (2.8.8)
221237
minitest (5.25.4)
@@ -447,6 +463,7 @@ GEM
447463
tins (1.33.0)
448464
bigdecimal
449465
sync
466+
traces (0.18.2)
450467
turbolinks (5.2.1)
451468
turbolinks-source (~> 5.2)
452469
turbolinks-source (5.2.0)

0 commit comments

Comments
 (0)