diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-10-21 19:35:23 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 19:35:23 +0530 |
commit | 0f27b84a5caa10d9056b7a4f9eace3771f8ea114 (patch) | |
tree | 60c51b69e36f520d653185d5ce9769e5311ad111 /ext/node/02_require.js | |
parent | 659a918f39c516fe90cab25facb02325e5e72371 (diff) |
chore(core): remove `core.opSync` (#16379)
This patch removes the last uses of `core.opSync` from Deno.
The new and JIT-friendly way to call sync ops is `core.ops.op_name()`.
Diffstat (limited to 'ext/node/02_require.js')
-rw-r--r-- | ext/node/02_require.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/node/02_require.js b/ext/node/02_require.js index 489c08779..c970d3994 100644 --- a/ext/node/02_require.js +++ b/ext/node/02_require.js @@ -351,8 +351,7 @@ } } - const isDenoDirPackage = Deno.core.opSync( - "op_require_is_deno_dir_package", + const isDenoDirPackage = Deno.core.ops.op_require_is_deno_dir_package( curPath, ); const isRelative = ops.op_require_is_request_relative( @@ -403,8 +402,7 @@ Module._resolveLookupPaths = function (request, parent) { const paths = []; if (parent?.filename && parent.filename.length > 0) { - const denoDirPath = core.opSync( - "op_require_resolve_deno_dir", + const denoDirPath = core.ops.op_require_resolve_deno_dir( request, parent.filename, ); @@ -813,7 +811,7 @@ function createRequire(filenameOrUrl) { // FIXME: handle URLs and validation - const filename = core.opSync("op_require_as_file_path", filenameOrUrl); + const filename = core.ops.op_require_as_file_path(filenameOrUrl); return createRequireFromPath(filename); } |