Skip to content

Commit 56a7404

Browse files
authored
chore(no-release): fix nested ifdef handling (#63)
1 parent 58237ab commit 56a7404

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/update-headers.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ function removeExperimentals(stream, destination, verbose = false) {
7171
const identifier = matches[2];
7272
macroStack.push(identifier);
7373

74+
if (mode.length && mode[mode.length - 1] === 'ignore') {
75+
debug(`Line ${lineNumber} Continued-Ignored ${identifier}`);
76+
mode.push('ignore');
77+
return;
78+
}
79+
7480
debug(`Line ${lineNumber} Pushed ${identifier}`);
7581

7682
if (identifier === 'NAPI_EXPERIMENTAL') {

0 commit comments

Comments
 (0)