From 5ff8cb4a9e0cbf0753ba12c74de9e84b6d06a460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 30 Jan 2019 21:34:31 +0200 Subject: [PATCH] @targos code review corrections Co-Authored-By: guybedford --- doc/api/esm.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index df368db700..d0f41fa206 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -214,7 +214,7 @@ PACKAGE_RESOLVE(_packageSpecifier_, _parentURL_) > 1. If the folder at _packageURL_ does not exist, then > 1. Set _parentURL_ to the parent URL path of _parentURL_. > 1. Continue the next loop iteration. -> 1. Let _pjson_be the result of **READ_PACKAGE_JSON**(_packageURL_). +> 1. Let _pjson_ be the result of **READ_PACKAGE_JSON**(_packageURL_). > 1. If _packageSubpath_ is empty, then > 1. Return the result of **PACKAGE_MAIN_RESOLVE**(_packageURL_, > _pjson_). @@ -227,7 +227,7 @@ PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_) > 1. Throw a _Module Not Found_ error. > 1. If _pjson.main_ is a String, then > 1. Let _resolvedMain_ be the concatenation of _packageURL_, "/", and -> _"pjson.main"_. +> _pjson.main_. > 1. If the file at _resolvedMain_ exists, then > 1. Return _resolvedMain_. > 1. If _pjson.type_ is equal to _"esm"_, then @@ -269,7 +269,7 @@ READ_PACKAGE_JSON(_packageURL_) > 1. Return **null**. > 1. If the file at _packageURL_ does not parse as valid JSON, then > 1. Throw an _Invalid Package Configuration_ error. -> 1. Return the parsed JSON source of the file at _url_. +> 1. Return the parsed JSON source of the file at _pjsonURL_. [Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md [`module.createRequireFromPath()`]: modules.html#modules_module_createrequirefrompath_filename