diff --git a/client/dom/index.mjs b/client/dom/index.mjs index 471f3b7c..8a65d85c 100644 --- a/client/dom/index.mjs +++ b/client/dom/index.mjs @@ -7,7 +7,7 @@ import {getExt} from '#common/util'; import * as Storage from '#dom/storage'; import * as RESTful from '#dom/rest'; import * as Images from './images.mjs'; -import renameCurrent from './operations/rename-current.js'; +import renameCurrent from './operations/rename-current.mjs'; import * as CurrentFile from './current-file.mjs'; import * as DOMTree from './dom-tree.mjs'; import * as Cmd from './cmd.mjs'; diff --git a/client/dom/operations/rename-current.js b/client/dom/operations/rename-current.mjs similarity index 81% rename from client/dom/operations/rename-current.js rename to client/dom/operations/rename-current.mjs index e8d29987..e446f5ca 100644 --- a/client/dom/operations/rename-current.js +++ b/client/dom/operations/rename-current.mjs @@ -1,15 +1,11 @@ -'use strict'; - /* global CloudCmd */ -const capitalize = require('just-capitalize'); +import capitalize from 'just-capitalize'; +import * as _Dialog from '#dom/dialog'; +import * as Storage from '#dom/storage'; +import * as RESTful from '#dom/rest'; +import * as _currentFile from '../current-file.mjs'; -const _Dialog = require('#dom/dialog'); -const Storage = require('#dom/storage'); -const RESTful = require('#dom/rest'); - -const _currentFile = require('../current-file.mjs'); - -module.exports = async (current, overrides = {}) => { +export default async (current, overrides = {}) => { const { refresh = CloudCmd.refresh, Dialog = _Dialog, diff --git a/client/dom/operations/rename-current.spec.js b/client/dom/operations/rename-current.spec.mjs similarity index 94% rename from client/dom/operations/rename-current.spec.js rename to client/dom/operations/rename-current.spec.mjs index 4a3c7fec..0d3483d1 100644 --- a/client/dom/operations/rename-current.spec.js +++ b/client/dom/operations/rename-current.spec.mjs @@ -1,8 +1,5 @@ -'use strict'; - -const {test, stub} = require('supertape'); - -const renameCurrent = require('./rename-current'); +import {test, stub} from 'supertape'; +import renameCurrent from './rename-current.mjs'; test('cloudcmd: client: dom: renameCurrent: isCurrentFile', async (t) => { const current = {}; @@ -87,3 +84,4 @@ const stubCurrentFile = (fns = {}) => { setCurrentName, }; }; +