Skip to content

Commit

Permalink
fix: upgrade dev dependencies to their latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
osdevisnot committed Oct 26, 2020
1 parent 034668c commit c561187
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/jsx-runtime/dist/index.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"semantic-release": "17.2.1",
"servor": "4.0.2",
"sort-package-json": "1.46.1",
"terser": "5.3.7",
"terser": "5.3.8",
"typescript": "4.0.3",
"xo": "0.34.1",
"xo-quick": "0.0.6"
Expand Down
11 changes: 5 additions & 6 deletions src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ const writeFiles = async (pkg, template, options) => {
for (const { file, content, extensions } of files) {
let existing = false
// If there's a range of possible extensions, check them all.
if (extensions) {
// eslint-disable-next-line no-await-in-loop
existing = (await Promise.all(extensions.map(async (ext) => exists(baseName(file) + ext)))).includes(true)
} else {
existing = exists(file)
}

existing = extensions
? // eslint-disable-next-line no-await-in-loop
(await Promise.all(extensions.map(async (ext) => exists(baseName(file) + ext)))).includes(true)
: exists(file)

if (!existing) {
// eslint-disable-next-line no-await-in-loop
Expand Down
4 changes: 2 additions & 2 deletions src/packages/terser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* - `rollup-plugin-terser` relies on `jest-worker`
* - `jest-worker` had issues with bundling approach we want to follow for `klap`.
*/
import { join } from 'path'
import path from 'path'
import { readFileSync, existsSync, writeFileSync } from 'fs'
import { codeFrameColumns } from '@babel/code-frame'
import { createFilter } from '@rollup/pluginutils'
Expand Down Expand Up @@ -32,7 +32,7 @@ export const terser = (options = {}) => {
}

// Read Project .terserrc if exists...
const rc = join(process.cwd(), '.terserrc')
const rc = path.join(process.cwd(), '.terserrc')
let cache

if (existsSync(rc)) {
Expand Down
6 changes: 3 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { execSync } from 'child_process'
import { existsSync as exists, readFile as _readFile, writeFile as _writeFile } from 'fs'
import mkdir from 'mkdirp'
import { dirname, parse } from 'path'
import path from 'path'
import { promisify } from 'util'

const readFile = promisify(_readFile)
Expand All @@ -10,7 +10,7 @@ const writeFile = promisify(_writeFile)
const read = async (p) => readFile(p, 'utf-8')

const write = async (p, d) => {
const dest = dirname(p)
const dest = path.dirname(p)
if (!exists(dest)) mkdir.sync(dest)
await writeFile(p, d + '\n', 'utf-8')
}
Expand All @@ -22,7 +22,7 @@ const safePackageName = (string) => snakeToCamel(string.replace('@', '').replace

const trim = (string) => string.replace(/^\s|\s$/, '')

const baseName = (string) => parse(string).name
const baseName = (string) => path.parse(string).name

const exec = (cmd) => {
try {
Expand Down

0 comments on commit c561187

Please sign in to comment.