[gjs/esm/dynamic-imports: 6/6] temp - cleanup




commit 91f001446cd1c2b850d59af3841fb20605254ab5
Author: Evan Welsh <contact evanwelsh com>
Date:   Sat Feb 6 20:51:17 2021 -0800

    temp - cleanup

 installed-tests/js/.eslintrc.yml    | 1 +
 installed-tests/js/modules/say.js   | 6 +++---
 installed-tests/js/testESModules.js | 8 ++++----
 modules/internal/loader.js          | 8 ++++----
 4 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/installed-tests/js/.eslintrc.yml b/installed-tests/js/.eslintrc.yml
index 28ec04c6..c1a4c9bd 100644
--- a/installed-tests/js/.eslintrc.yml
+++ b/installed-tests/js/.eslintrc.yml
@@ -35,5 +35,6 @@ overrides:
       - testESModules.js
       - modules/importmeta.js
       - modules/exports.js
+      - modules/say.js
     parserOptions:
       sourceType: module
diff --git a/installed-tests/js/modules/say.js b/installed-tests/js/modules/say.js
index 4729dff5..0e543cae 100644
--- a/installed-tests/js/modules/say.js
+++ b/installed-tests/js/modules/say.js
@@ -1,7 +1,7 @@
 export function say(str) {
-  return `<( ${str} )`;
+    return `<( ${str} )`;
 }
 
-export default function() {
-  return 'default export';
+export default function () {
+    return 'default export';
 }
diff --git a/installed-tests/js/testESModules.js b/installed-tests/js/testESModules.js
index bdc1a89f..a36cccc5 100644
--- a/installed-tests/js/testESModules.js
+++ b/installed-tests/js/testESModules.js
@@ -82,18 +82,18 @@ describe('Dynamic imports', function () {
     let module;
     beforeEach(async function () {
         try {
-            module = await import('resource:///org/gjs/jsunit/modules/say.js')
-        } catch(err) {
+            module = await import('resource:///org/gjs/jsunit/modules/say.js');
+        } catch (err) {
             logError(err);
             fail();
         }
     });
 
-    it('default import', async function () {
+    it('default import', function () {
         expect(module.default()).toEqual('default export');
     });
 
-    it('named import', async function () {
+    it('named import', function () {
         expect(module.say('hi')).toEqual('<( hi )');
     });
 });
diff --git a/modules/internal/loader.js b/modules/internal/loader.js
index bf2b8b33..59e01de9 100644
--- a/modules/internal/loader.js
+++ b/modules/internal/loader.js
@@ -133,9 +133,9 @@ class ModuleLoader extends InternalModuleLoader {
     /**
      * Resolves a module import with optional handling for relative imports asynchronously.
      *
-     * @param {import("./internalLoader.js").ModulePrivate} importingModulePriv
-     *   the private object of the module initiating the import
-     * @param {string} specifier the module specifier to resolve for an import
+     * @param {string} specifier the specifier (e.g. relative path, root package) to resolve
+     * @param {string | null} importingModuleURI the URI of the module
+     *   triggering this resolve
      * @returns {import("../types").Module}
      */
     async resolveModuleAsync(specifier, importingModuleURI) {
@@ -245,5 +245,5 @@ moduleLoader.registerScheme('gi', {
     loadAsync(uri) {
         // gi: only does string manipulation, so it is safe to use the same code for sync and async.
         return this.load(uri);
-    }
+    },
 });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]