@epublishing/grunt-epublishing 0.3.18 → 0.3.22
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.
- package/node-upgrade.md +368 -0
- package/package.json +8 -3
- package/tasks/jade.js +16 -0
- package/tasks/npm-install.js +1 -1
- package/tasks/sass.js +0 -6
package/node-upgrade.md
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
# Node.js v8 to v16 Server Upgrade Strategy
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document outlines a phased approach for upgrading Node.js directly from version 8 to version 16 across our server infrastructure, with rollback procedures at each step.
|
|
6
|
+
|
|
7
|
+
## Server Deployment Overview
|
|
8
|
+
|
|
9
|
+
## Staging Servers
|
|
10
|
+
|
|
11
|
+
### rails-stage-app-10.cloud.epub.net
|
|
12
|
+
|
|
13
|
+
- arwarchitect
|
|
14
|
+
- bevindustry
|
|
15
|
+
- bioworld
|
|
16
|
+
- creditunionmagazine
|
|
17
|
+
- foodengineeringmag
|
|
18
|
+
- halldale
|
|
19
|
+
- packagingstrategies
|
|
20
|
+
- remediation-technology
|
|
21
|
+
- roofingsupplypro
|
|
22
|
+
- rtoinsder
|
|
23
|
+
- supplychainquarterly
|
|
24
|
+
|
|
25
|
+
### rails-stage-app-11.cloud.epub.net
|
|
26
|
+
|
|
27
|
+
- adhesivesmag
|
|
28
|
+
- agproud
|
|
29
|
+
- assemblymag
|
|
30
|
+
- cannabisproductsinsider
|
|
31
|
+
- centerwatch
|
|
32
|
+
- dairyfoods
|
|
33
|
+
- dairyprocessing
|
|
34
|
+
- demoepub
|
|
35
|
+
- demoepub_docker_image
|
|
36
|
+
- discoverconcordma
|
|
37
|
+
- esmagazine
|
|
38
|
+
- farm-equipment
|
|
39
|
+
- fdanews
|
|
40
|
+
- thecarlatreport
|
|
41
|
+
- thescxchange
|
|
42
|
+
- wholefoodsmagazine
|
|
43
|
+
|
|
44
|
+
### continuum-stage-app-6.epublishing.internal
|
|
45
|
+
|
|
46
|
+
- agequipmentintelligence
|
|
47
|
+
- alpha
|
|
48
|
+
- bakemag
|
|
49
|
+
- beverage-digest
|
|
50
|
+
- bnpevents
|
|
51
|
+
- businesswatchnetwork
|
|
52
|
+
- continuum
|
|
53
|
+
- covercropstrategies
|
|
54
|
+
- foodbusinessnews
|
|
55
|
+
- insidemortgagefinance
|
|
56
|
+
- logisticsdevelopmentforum
|
|
57
|
+
- meatpoultry
|
|
58
|
+
- newsletterclarivate
|
|
59
|
+
- petfoodprocessing
|
|
60
|
+
- supermarketperimeter
|
|
61
|
+
- supplychainbrain
|
|
62
|
+
- worldgrain
|
|
63
|
+
|
|
64
|
+
### continuum-stage-app-5.epublishing.internal
|
|
65
|
+
|
|
66
|
+
- agri-pulse
|
|
67
|
+
- architecturalrecord
|
|
68
|
+
- enr
|
|
69
|
+
- graphql_api
|
|
70
|
+
- metaservices
|
|
71
|
+
- qualitymag
|
|
72
|
+
- roofingcontractor
|
|
73
|
+
- safetyandhealthmagazine
|
|
74
|
+
- spokanejournal
|
|
75
|
+
- stoneworld
|
|
76
|
+
- thehabitatgroup
|
|
77
|
+
- thesunmagazine
|
|
78
|
+
|
|
79
|
+
### rails-stage-app-8.cloud.epub.net
|
|
80
|
+
|
|
81
|
+
- achrnews
|
|
82
|
+
- americanfarriers
|
|
83
|
+
- foodmaster
|
|
84
|
+
- geartechnology
|
|
85
|
+
- ishn
|
|
86
|
+
- pcimag
|
|
87
|
+
- pmengineer
|
|
88
|
+
- pmmag
|
|
89
|
+
- powertransmission
|
|
90
|
+
- precisionfarmingdealer
|
|
91
|
+
- preparedfoods
|
|
92
|
+
- provisioneronline
|
|
93
|
+
- rurallifestyledealer
|
|
94
|
+
- securitymagazine
|
|
95
|
+
- striptillfarmer
|
|
96
|
+
- wconline
|
|
97
|
+
|
|
98
|
+
### rails-stage-app-9.cloud.epub.net
|
|
99
|
+
|
|
100
|
+
- bakingbusiness
|
|
101
|
+
- food-safety
|
|
102
|
+
- missioncriticalmagazine
|
|
103
|
+
- mwjournal
|
|
104
|
+
- phcppros
|
|
105
|
+
- randrmagonline
|
|
106
|
+
- refrigeratedfrozenfood
|
|
107
|
+
- sdmmag
|
|
108
|
+
- signalintegrityjournal
|
|
109
|
+
- snackandbakery
|
|
110
|
+
- supplyht
|
|
111
|
+
- thedriller
|
|
112
|
+
- tricitiesbusinessnews
|
|
113
|
+
|
|
114
|
+
## Production Servers
|
|
115
|
+
|
|
116
|
+
### bnp-app-11.cloud.epub.net
|
|
117
|
+
|
|
118
|
+
- achrnews
|
|
119
|
+
- adhesivesmag
|
|
120
|
+
- arwarchitect
|
|
121
|
+
- bevindustry
|
|
122
|
+
- dairyfoods
|
|
123
|
+
- esmagazine
|
|
124
|
+
- food-safety
|
|
125
|
+
- missioncriticalmagazine
|
|
126
|
+
- pcimag
|
|
127
|
+
- pmengineer
|
|
128
|
+
- thedriller
|
|
129
|
+
|
|
130
|
+
### bnp-app-12.cloud.epub.net
|
|
131
|
+
|
|
132
|
+
- achrnews
|
|
133
|
+
- adhesivesmag
|
|
134
|
+
- arwarchitect
|
|
135
|
+
- bevindustry
|
|
136
|
+
- dairyfoods
|
|
137
|
+
- esmagazine
|
|
138
|
+
- food-safety
|
|
139
|
+
- missioncriticalmagazine
|
|
140
|
+
- pcimag
|
|
141
|
+
- pmengineer
|
|
142
|
+
- thedriller
|
|
143
|
+
|
|
144
|
+
### bnp-app-13.cloud.epub.net
|
|
145
|
+
|
|
146
|
+
- achrnews
|
|
147
|
+
- assemblymag
|
|
148
|
+
- bnpevents
|
|
149
|
+
- cannabisproductsinsider
|
|
150
|
+
- enr
|
|
151
|
+
- foodmaster
|
|
152
|
+
- preparedfoods
|
|
153
|
+
- provisioneronline
|
|
154
|
+
- randrmagonline
|
|
155
|
+
- refrigeratedfrozenfood
|
|
156
|
+
- remediation-technology
|
|
157
|
+
- sdmmag
|
|
158
|
+
- snackandbakery
|
|
159
|
+
- supplyht
|
|
160
|
+
- wconline
|
|
161
|
+
|
|
162
|
+
### bnp-app-14.cloud.epub.net
|
|
163
|
+
|
|
164
|
+
- achrnews
|
|
165
|
+
- assemblymag
|
|
166
|
+
- bnpevents
|
|
167
|
+
- cannabisproductsinsider
|
|
168
|
+
- enr
|
|
169
|
+
- foodmaster
|
|
170
|
+
- preparedfoods
|
|
171
|
+
- provisioneronline
|
|
172
|
+
- randrmagonline
|
|
173
|
+
- refrigeratedfrozenfood
|
|
174
|
+
- remediation-technology
|
|
175
|
+
- sdmmag
|
|
176
|
+
- snackandbakery
|
|
177
|
+
- supplyht
|
|
178
|
+
- wconline
|
|
179
|
+
|
|
180
|
+
### bnp-app-15.cloud.epub.net
|
|
181
|
+
|
|
182
|
+
- achrnews
|
|
183
|
+
- architecturalrecord
|
|
184
|
+
- enr
|
|
185
|
+
- foodengineeringmag
|
|
186
|
+
- ishn
|
|
187
|
+
- logisticsdevelopmentforum
|
|
188
|
+
- packagingstrategies
|
|
189
|
+
- pmmag
|
|
190
|
+
- qualitymag
|
|
191
|
+
- roofingcontractor
|
|
192
|
+
- roofingsupplypro
|
|
193
|
+
- securitymagazine
|
|
194
|
+
- stoneworld
|
|
195
|
+
|
|
196
|
+
### bnp-app-16.cloud.epub.net
|
|
197
|
+
|
|
198
|
+
- achrnews
|
|
199
|
+
- architecturalrecord
|
|
200
|
+
- enr
|
|
201
|
+
- foodengineeringmag
|
|
202
|
+
- ishn
|
|
203
|
+
- logisticsdevelopmentforum
|
|
204
|
+
- packagingstrategies
|
|
205
|
+
- pmmag
|
|
206
|
+
- qualitymag
|
|
207
|
+
- roofingcontractor
|
|
208
|
+
- roofingsupplypro
|
|
209
|
+
- securitymagazine
|
|
210
|
+
- stoneworld
|
|
211
|
+
|
|
212
|
+
### rails-app-101.cloud.epub.net
|
|
213
|
+
|
|
214
|
+
- agequipmentintelligence
|
|
215
|
+
- agri-pulse
|
|
216
|
+
- americanfarriers
|
|
217
|
+
- discoverconcordma
|
|
218
|
+
- phcppros
|
|
219
|
+
- thecarlatreport
|
|
220
|
+
- thehabitatgroup
|
|
221
|
+
- wholefoodsmagazine
|
|
222
|
+
|
|
223
|
+
### rails-app-102.cloud.epub.net
|
|
224
|
+
|
|
225
|
+
- agequipmentintelligence
|
|
226
|
+
- agri-pulse
|
|
227
|
+
- americanfarriers
|
|
228
|
+
- discoverconcordma
|
|
229
|
+
- phcppros
|
|
230
|
+
- thecarlatreport
|
|
231
|
+
- thehabitatgroup
|
|
232
|
+
- wholefoodsmagazine
|
|
233
|
+
|
|
234
|
+
### rails-app-103.cloud.epub.net
|
|
235
|
+
|
|
236
|
+
- beverage-digest
|
|
237
|
+
- centerwatch
|
|
238
|
+
- covercropstrategies
|
|
239
|
+
- farm-equipment
|
|
240
|
+
- fdanews
|
|
241
|
+
- halldale
|
|
242
|
+
- newsletterclarivate
|
|
243
|
+
- rtoinsder
|
|
244
|
+
- rurallifestyledealer
|
|
245
|
+
- signalintegrityjournal
|
|
246
|
+
|
|
247
|
+
### rails-app-104.cloud.epub.net
|
|
248
|
+
|
|
249
|
+
- beverage-digest
|
|
250
|
+
- centerwatch
|
|
251
|
+
- covercropstrategies
|
|
252
|
+
- farm-equipment
|
|
253
|
+
- fdanews
|
|
254
|
+
- halldale
|
|
255
|
+
- newsletterclarivate
|
|
256
|
+
- rtoinsder
|
|
257
|
+
- rurallifestyledealer
|
|
258
|
+
- signalintegrityjournal
|
|
259
|
+
|
|
260
|
+
### rails-app-105.cloud.epub.net
|
|
261
|
+
|
|
262
|
+
- foodbusinessnews
|
|
263
|
+
- hfmmagazine
|
|
264
|
+
- mwjournal
|
|
265
|
+
- no-tillfarmer
|
|
266
|
+
- precisionfarmingdealer
|
|
267
|
+
- safetyandhealthmagazine
|
|
268
|
+
- striptillfarmer
|
|
269
|
+
- supplychainbrain
|
|
270
|
+
- supplychainquarterly
|
|
271
|
+
- thescxchange
|
|
272
|
+
|
|
273
|
+
### rails-app-106.cloud.epub.net
|
|
274
|
+
|
|
275
|
+
- foodbusinessnews
|
|
276
|
+
- hfmmagazine
|
|
277
|
+
- mwjournal
|
|
278
|
+
- no-tillfarmer
|
|
279
|
+
- precisionfarmingdealer
|
|
280
|
+
- safetyandhealthmagazine
|
|
281
|
+
- striptillfarmer
|
|
282
|
+
- supplychainbrain
|
|
283
|
+
- supplychainquarterly
|
|
284
|
+
- thescxchange
|
|
285
|
+
|
|
286
|
+
### rails-app-107.cloud.epub.net
|
|
287
|
+
|
|
288
|
+
- agproud
|
|
289
|
+
- bakingbusiness
|
|
290
|
+
- bioworld
|
|
291
|
+
- geartechnology
|
|
292
|
+
- powertransmission
|
|
293
|
+
- spokanejournal
|
|
294
|
+
- thesunmagazine
|
|
295
|
+
- tricitiesbusinessnews
|
|
296
|
+
|
|
297
|
+
### rails-app-108.cloud.epub.net
|
|
298
|
+
|
|
299
|
+
- agproud
|
|
300
|
+
- bakingbusiness
|
|
301
|
+
- bioworld
|
|
302
|
+
- geartechnology
|
|
303
|
+
- powertransmission
|
|
304
|
+
- spokanejournal
|
|
305
|
+
- thesunmagazine
|
|
306
|
+
- tricitiesbusinessnews
|
|
307
|
+
|
|
308
|
+
### rails-internal-app-101.cloud.epub.net
|
|
309
|
+
|
|
310
|
+
- metaservices
|
|
311
|
+
|
|
312
|
+
### rails-internal-app-102.cloud.epub.net
|
|
313
|
+
|
|
314
|
+
- metaservices
|
|
315
|
+
|
|
316
|
+
## Pre-Upgrade Preparation
|
|
317
|
+
|
|
318
|
+
1. Create full system backups of all servers
|
|
319
|
+
2. Update package.json dependencies for v16 compatibility on all repositories in the rails/upgrade/master branch. This is already done for all jade sites.
|
|
320
|
+
|
|
321
|
+
## Phase 1: Staging Environment Upgrade (v8 → v16)
|
|
322
|
+
|
|
323
|
+
1. Upgrade all staging servers to Node.js 16
|
|
324
|
+
2. Merge all jade sites' rails/upgrade/master branch into their respective repositories' staging branch.
|
|
325
|
+
3. Update package.json dependencies for v16 compatibility (already done for all jade sites)
|
|
326
|
+
4. Deploy staging branch to all staging servers
|
|
327
|
+
5. Run test suite and fix any breaking changes
|
|
328
|
+
|
|
329
|
+
### Rollback Plan Phase 1
|
|
330
|
+
|
|
331
|
+
- Restore system backup
|
|
332
|
+
- Revert staging branch to previous state
|
|
333
|
+
- Reinstall Node.js v8
|
|
334
|
+
- Verify system functionality
|
|
335
|
+
|
|
336
|
+
**By upgrading staging servers first, we can thoroughly verify each site's functionality in a controlled environment without any impact to production traffic.** This critical staging phase significantly reduces downtime risks and provides a crucial safety net, allowing us to identify and resolve any compatibility issues before touching customer-facing systems. This approach is essential for maintaining system reliability throughout the upgrade process.
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## Phase 2: Production Environment Upgrade (v8 → v16)
|
|
340
|
+
|
|
341
|
+
1. Select one production server for initial upgrade
|
|
342
|
+
2. Upgrade selected server to Node.js 16
|
|
343
|
+
3. Merge rails/upgrade/master branch into that server's repository's master branch
|
|
344
|
+
4. Deploy master branch to selected server for all sites on that server
|
|
345
|
+
5. Monitor performance metrics and error rates for 24 hours
|
|
346
|
+
6. If stable, continue monitoring for 1 week
|
|
347
|
+
7. Repeat steps 1-6 for each remaining production server
|
|
348
|
+
|
|
349
|
+
### Rollback Plan Phase 2
|
|
350
|
+
|
|
351
|
+
- Restore system backup
|
|
352
|
+
- Revert master branch to previous state
|
|
353
|
+
- Reinstall Node.js v8
|
|
354
|
+
- Verify system functionality
|
|
355
|
+
|
|
356
|
+
## Success Criteria
|
|
357
|
+
|
|
358
|
+
- Zero downtime during transitions
|
|
359
|
+
- Error rates remain at or below baseline
|
|
360
|
+
- Response times within 10% of baseline
|
|
361
|
+
- All automated tests passing
|
|
362
|
+
- No customer-reported issues
|
|
363
|
+
|
|
364
|
+
## Timeline
|
|
365
|
+
|
|
366
|
+
- Phase 1: 2 weeks
|
|
367
|
+
- Phase 2: 3 weeks
|
|
368
|
+
- Total: 5 weeks
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epublishing/grunt-epublishing",
|
|
3
3
|
"description": "Automated front-end tasks for ePublishing Jade and client sites.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.22",
|
|
5
5
|
"homepage": "https://www.epublishing.com",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -23,12 +23,17 @@
|
|
|
23
23
|
"node": ">= 16.20.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@
|
|
26
|
+
"@babel/core": "^7.25.2",
|
|
27
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
28
|
+
"@babel/plugin-transform-react-jsx": "^7.25.2",
|
|
29
|
+
"@babel/preset-env": "^7.25.4",
|
|
30
|
+
"@babel/preset-react": "^7.24.7",
|
|
31
|
+
"@epublishing/babel-preset-epublishing": "^0.2.0",
|
|
27
32
|
"@epublishing/get-gem-paths": "^0.1.1",
|
|
28
33
|
"@epublishing/grunt-install-eslint": "^0.1.1",
|
|
29
34
|
"@epublishing/jade-resolver": "^0.1.2",
|
|
30
35
|
"async": "^2.6.1",
|
|
31
|
-
"babel-loader": "^
|
|
36
|
+
"babel-loader": "^9.1.3",
|
|
32
37
|
"babel-minify-webpack-plugin": "^0.3.0",
|
|
33
38
|
"babel-plugin-transform-react-jsx": "^6.24.1",
|
|
34
39
|
"bourbon": "^7.3.0",
|
package/tasks/jade.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
|
|
3
|
+
if (typeof globalThis === 'undefined') {
|
|
4
|
+
(function() {
|
|
5
|
+
if (typeof self !== 'undefined') { self.globalThis = self; }
|
|
6
|
+
else if (typeof window !== 'undefined') { window.globalThis = window; }
|
|
7
|
+
else if (typeof global !== 'undefined') { global.globalThis = global; }
|
|
8
|
+
else {
|
|
9
|
+
Object.defineProperty(Object.prototype, 'globalThis', {
|
|
10
|
+
get: function() {
|
|
11
|
+
return this;
|
|
12
|
+
},
|
|
13
|
+
configurable: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
})();
|
|
17
|
+
}
|
|
18
|
+
|
|
3
19
|
'use strict';
|
|
4
20
|
|
|
5
21
|
const path = require('path');
|
package/tasks/npm-install.js
CHANGED
package/tasks/sass.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable prefer-object-spread, promise/prefer-await-to-then */
|
|
2
1
|
'use strict';
|
|
3
2
|
const util = require('util');
|
|
4
3
|
const sass = require('sass');
|
|
@@ -12,11 +11,6 @@ module.exports = grunt => {
|
|
|
12
11
|
precision: 10
|
|
13
12
|
});
|
|
14
13
|
|
|
15
|
-
if (!options.implementation) {
|
|
16
|
-
grunt.fatal('The implementation option must be passed to the Sass task');
|
|
17
|
-
}
|
|
18
|
-
grunt.verbose.writeln(`\n${options.implementation.info}\n`);
|
|
19
|
-
|
|
20
14
|
(async () => {
|
|
21
15
|
await Promise.all(this.files.map(async item => {
|
|
22
16
|
const [src] = item.src;
|