Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7ef9099

Browse files
committed
Build: fix inconsistent builds in Node 20
- one fileOverrides per build- only run the lint build when running lintClosegh-5332
1 parent77d6ad7 commit7ef9099

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

‎.github/workflows/node.js.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,8 @@ jobs:
7070
run:npx playwright-webkit install-deps
7171
if:matrix.NPM_SCRIPT == 'test:browser' && contains(matrix.BROWSERS, 'WebkitHeadless')
7272

73-
-name:Build jQuery for Lint
74-
run:npm run build:all
75-
if:matrix.NPM_SCRIPT == 'test:browserless'
76-
7773
-name:Lint code
78-
run:npm run lint
74+
run:npm runbuild:all && npm runlint
7975
if:matrix.NODE_VERSION == '18.x'
8076

8177
-name:Prepare tests

‎build/tasks/build.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,6 @@ async function getOutputRollupOptions( {
102102
};
103103
}
104104

105-
constfileOverrides=newMap();
106-
107-
functionsetOverride(filePath,source){
108-
109-
// We want normalized paths in overrides as they will be matched
110-
// against normalized paths in the file overrides Rollup plugin.
111-
fileOverrides.set(path.resolve(filePath),source);
112-
}
113-
114105
functionunique(array){
115106
return[ ...newSet(array)];
116107
}
@@ -179,6 +170,15 @@ async function build( {
179170
}={}){
180171
constpureSlim=slim&&!exclude.length&&!include.length;
181172

173+
constfileOverrides=newMap();
174+
175+
functionsetOverride(filePath,source){
176+
177+
// We want normalized paths in overrides as they will be matched
178+
// against normalized paths in the file overrides Rollup plugin.
179+
fileOverrides.set(path.resolve(filePath),source);
180+
}
181+
182182
// Add the short commit hash to the version string
183183
// when the version is not for a release.
184184
if(!version){
@@ -280,11 +280,6 @@ async function build( {
280280
);
281281
}
282282

283-
constbundle=awaitrollup.rollup({
284-
...inputOptions,
285-
plugins:[rollupFileOverrides(fileOverrides)]
286-
});
287-
288283
constoutputOptions=awaitgetOutputRollupOptions({ esm, factory});
289284

290285
if(watch){
@@ -326,6 +321,11 @@ async function build( {
326321

327322
returnwatcher;
328323
}else{
324+
constbundle=awaitrollup.rollup({
325+
...inputOptions,
326+
plugins:[rollupFileOverrides(fileOverrides)]
327+
});
328+
329329
const{
330330
output:[{ code}]
331331
}=awaitbundle.generate(outputOptions);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp