File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 3333 required : false
3434 default : ' ["20", "22"]'
3535 type : string
36+ disallow-code-generation-from-strings :
37+ description : ' Enables --disallow-code-generation-from-strings flag for Node.js'
38+ required : false
39+ default : false
40+ type : boolean
3641
3742jobs :
3843 dependency-review :
@@ -110,12 +115,23 @@ jobs:
110115 matrix :
111116 node-version : ${{ fromJson(inputs.node-versions) }}
112117 os : [macos-latest, ubuntu-latest, windows-latest]
118+ disallow-code-generation-from-strings : ${{ inputs.disallow-code-generation-from-strings == true && ['true', 'false'] || ['false'] }}
113119 exclude :
114120 - os : macos-latest
115121 node-version : 14
116122 - os : macos-latest
117123 node-version : 16
118124 steps :
125+ - name : Set node flags
126+ id : node-flags
127+ shell : bash
128+ run : |
129+ if [ "${{ matrix.disallow-code-generation-from-strings }}" = "true" ]; then
130+ echo "flags=--disallow-code-generation-from-strings" >> $GITHUB_OUTPUT
131+ else
132+ echo "flags=" >> $GITHUB_OUTPUT
133+ fi
134+
119135 - name : Check out repo
120136 uses : actions/checkout@v4
121137 with :
@@ -130,7 +146,7 @@ jobs:
130146 run : npm i --ignore-scripts
131147
132148 - name : Run tests
133- run : npm test
149+ run : NODE_OPTIONS="${{ steps.node-flags.outputs.flags }}" npm test
134150
135151 fastify-dependency-integration :
136152 name : Test Fastify Integration
You can’t perform that action at this time.
0 commit comments