diff --git a/package.json b/package.json index 2e3ca19..f0bed28 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@rollup/plugin-node-resolve": "11.0.1", "@rollup/plugin-replace": "2.3.4", "@rollup/pluginutils": "4.1.0", - "@types/node": "14.14.16", + "@types/node": "14.14.19", "@vercel/ncc": "0.24.1", "babel-plugin-codegen": "4.0.1", "babel-plugin-dev-expression": "0.2.2", @@ -81,10 +81,10 @@ "rollup-plugin-node-globals": "1.4.0", "semantic-release": "17.3.1", "servor": "4.0.2", - "sort-package-json": "1.48.0", + "sort-package-json": "1.48.1", "terser": "5.5.1", "typescript": "^4.1.3", - "xo": "0.36.1", + "xo": "0.37.1", "xo-quick": "0.0.6" } } diff --git a/src/babel.js b/src/babel.js index 5ce5e46..315f1c5 100644 --- a/src/babel.js +++ b/src/babel.js @@ -15,7 +15,7 @@ import pluginMacros from 'babel-plugin-macros' import pluginCodegen from 'babel-plugin-codegen' const hasPackage = (pkg, name) => - // eslint-disable-next-line unicorn/no-reduce + // eslint-disable-next-line unicorn/no-array-reduce ['dependencies', 'devDependencies', 'peerDependencies'].reduce( (last, current) => last || (pkg[current] && pkg[current][name]), false diff --git a/src/init.js b/src/init.js index 95a290c..1a767a5 100644 --- a/src/init.js +++ b/src/init.js @@ -1,9 +1,9 @@ import merge from 'deepmerge' import sort from 'sort-package-json' import cli from '../package.json' -import { getDefaults, getTemplates } from './init-create' -import { error, info, warn } from './logger' -import { exec, exists, read, write, baseName } from './utils' +import { getDefaults, getTemplates } from './init-create.js' +import { error, info, warn } from './logger.js' +import { exec, exists, read, write, baseName } from './utils.js' /** * Source user's .gitconfig info (name & email) diff --git a/src/klap.js b/src/klap.js index 3836467..2191d51 100644 --- a/src/klap.js +++ b/src/klap.js @@ -1,8 +1,8 @@ import { rollup, watch } from 'rollup' -import { error, info, log } from './logger' -import { getOptions } from './options' -import { plugins, dtsPlugins } from './plugins' -import { exists, read } from './utils' +import { error, info, log } from './logger.js' +import { getOptions } from './options.js' +import { plugins, dtsPlugins } from './plugins.js' +import { exists, read } from './utils.js' const defaultInputOptions = { inlineDynamicImports: true } const defaultOutputOptions = { esModule: false, strict: false, freeze: false } @@ -170,5 +170,5 @@ const klap = async (command, pkg) => { } } -export { init } from './init' +export { init } from './init.js' export { klap, error, info, log, read } diff --git a/src/options.js b/src/options.js index 5e420dd..704689f 100644 --- a/src/options.js +++ b/src/options.js @@ -1,5 +1,5 @@ import getopts from 'getopts' -import { safePackageName } from './utils' +import { safePackageName } from './utils.js' const getOptions = (pkg, command) => { const { diff --git a/src/packages/servor.js b/src/packages/servor.js index eddb914..b22a058 100644 --- a/src/packages/servor.js +++ b/src/packages/servor.js @@ -2,7 +2,7 @@ * A rollup plugin to start `servor` as build step */ import _servor from 'servor' -import { warn } from '../logger' +import { warn } from '../logger.js' let singleton = false diff --git a/src/packages/sizeme.js b/src/packages/sizeme.js index b590100..8496a17 100644 --- a/src/packages/sizeme.js +++ b/src/packages/sizeme.js @@ -6,7 +6,7 @@ */ import gzip from 'gzip-size' import prettyBytes from 'pretty-bytes' -import { info } from '../logger' +import { info } from '../logger.js' export const sizeme = () => { const showSize = (bundle) => { diff --git a/src/packages/terser.js b/src/packages/terser.js index f9738db..bc35740 100644 --- a/src/packages/terser.js +++ b/src/packages/terser.js @@ -9,7 +9,7 @@ import { readFileSync, existsSync, writeFileSync } from 'fs' import { codeFrameColumns } from '@babel/code-frame' import { createFilter } from '@rollup/pluginutils' import { minify } from 'terser' -import { error } from '../logger' +import { error } from '../logger.js' import merge from 'deepmerge' const transform = async (code, options) => { diff --git a/src/plugins.js b/src/plugins.js index 883a91c..cbba4d9 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -6,11 +6,11 @@ import replace from '@rollup/plugin-replace' import nodeGlobals from 'rollup-plugin-node-globals' import babel from '@rollup/plugin-babel' -import { terser } from './packages/terser' -import { sizeme } from './packages/sizeme' -import { servor } from './packages/servor' +import { terser } from './packages/terser.js' +import { sizeme } from './packages/sizeme.js' +import { servor } from './packages/servor.js' -import { babelConfig } from './babel' +import { babelConfig } from './babel.js' const plugins = (command, pkg, options) => { const { extensions, presets, plugins } = babelConfig(command, pkg, options)