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

Appearance settings

Commit c416f56

Browse filesBrowse files
committed
Pass nativeRequire, as well
1 parent 75e3a5b commit c416f56
Copy full SHA for c416f56

File tree

5 files changed

+4
-2
lines changed
Filter options

5 files changed

+4
-2
lines changed

‎dist/index.js

Copy file name to clipboardExpand all lines: dist/index.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,6 +2494,7 @@ async function main() {
24942494
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
24952495
const result = await callAsyncFunction({
24962496
require: wrapRequire,
2497+
nativeRequire: require,
24972498
github,
24982499
context: lib_github.context,
24992500
core: core,

‎src/async-function.ts

Copy file name to clipboardExpand all lines: src/async-function.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type AsyncFunctionArguments = {
1313
glob: typeof glob
1414
io: typeof io
1515
require: NodeRequire
16+
nativeRequire: NodeRequire
1617
}
1718

1819
export function callAsyncFunction<T>(

‎src/main.ts

Copy file name to clipboardExpand all lines: src/main.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ async function main(): Promise<void> {
3232
const result = await callAsyncFunction(
3333
{
3434
require: wrapRequire,
35+
nativeRequire: __non_webpack_require__,
3536
github,
3637
context,
3738
core,

‎src/wrap-require.ts

Copy file name to clipboardExpand all lines: src/wrap-require.ts
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import * as path from 'path'
22

3-
declare const __non_webpack_require__: NodeRequire
4-
53
export const wrapRequire = new Proxy(__non_webpack_require__, {
64
apply: (target, thisArg, [moduleID]) => {
75
if (moduleID.startsWith('.')) {

‎types/non-webpack-require.ts

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare const __non_webpack_require__: NodeRequire

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.