From 0218398db2cda7295619c47f718d58e9c9238dbc Mon Sep 17 00:00:00 2001 From: oganexon Date: Fri, 16 Apr 2021 19:15:48 +0200 Subject: [PATCH] chore: :arrow_up: Update eggs to deno@1.9.0 --- README.md | 10 +--------- benchmarks/commands/update/deps.ts | 24 ++++++++++++------------ deps.ts | 30 +++++++++++++++--------------- eggs.ts | 6 +++--- src/api/common.ts | 4 ++-- src/commands/init.ts | 1 - src/commands/install.ts | 4 ++-- src/commands/publish.ts | 17 ++++++++--------- src/context/ignore.ts | 2 +- src/schema.json | 2 +- src/utilities/types.ts | 2 +- src/version.ts | 2 +- 12 files changed, 47 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index a5916eb..e0dcbe1 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ **Note: You need to upgrade to Deno v1.6.0 or newer in order to use our CLI.** ```shell script -deno install -Afq --unstable https://x.nest.land/eggs@0.3.5/eggs.ts +deno install -Afq --unstable https://x.nest.land/eggs@0.3.6/eggs.ts ``` For more information, see the [documentation](https://docs.nest.land/). @@ -129,14 +129,6 @@ eggs update # Updates everything eggs update http fs eggs # Updates only http, fs, eggs ``` -Scripts installed with `eggs install` can also be updated with the `-g` -parameter. - -```shell script -eggs update -g # Updates every script installed with eggs install -eggs update eggs denon -g # Updates only eggs, denon -``` - Several registries are supported. The current ones are: - x.nest.land diff --git a/benchmarks/commands/update/deps.ts b/benchmarks/commands/update/deps.ts index 30c6e72..abc55d5 100644 --- a/benchmarks/commands/update/deps.ts +++ b/benchmarks/commands/update/deps.ts @@ -3,17 +3,17 @@ export { bench, runBenchmarks, } from "https://x.nest.land/std@0.61.0/testing/bench.ts"; -import * as archive from "https://x.nest.land/std@0.61.0/archive/tar.ts"; -import * as denoSync from "https://x.nest.land/std@0.61.0/async/mod.ts"; -import * as bytes from "https://x.nest.land/std@0.61.0/bytes/mod.ts"; -import * as dateTime from "https://x.nest.land/std@0.61.0/datetime/mod.ts"; -import * as colors from "https://x.nest.land/std@0.61.0/fmt/colors.ts"; -import * as sha512 from "https://x.nest.land/std@0.61.0/hash/sha512.ts"; -import * as http from "https://x.nest.land/std@0.61.0/http/mod.ts"; -import * as io from "https://x.nest.land/std@0.61.0/io/mod.ts"; -import * as log from "https://x.nest.land/std@0.61.0/log/mod.ts"; +import * as _archive from "https://x.nest.land/std@0.61.0/archive/tar.ts"; +import * as _denoSync from "https://x.nest.land/std@0.61.0/async/mod.ts"; +import * as _bytes from "https://x.nest.land/std@0.61.0/bytes/mod.ts"; +import * as _dateTime from "https://x.nest.land/std@0.61.0/datetime/mod.ts"; +import * as _colors from "https://x.nest.land/std@0.61.0/fmt/colors.ts"; +import * as _sha512 from "https://x.nest.land/std@0.61.0/hash/sha512.ts"; +import * as _http from "https://x.nest.land/std@0.61.0/http/mod.ts"; +import * as _io from "https://x.nest.land/std@0.61.0/io/mod.ts"; +import * as _log from "https://x.nest.land/std@0.61.0/log/mod.ts"; // deno land 3rd party -import * as dmm from "https://deno.land/x/dmm@v1.0.2/mod.ts"; -import * as drash from "https://deno.land/x/drash@v1.0.2/mod.ts"; -import * as bcrypt from "https://deno.land/x/bcrypt@v0.2.0/mod.ts"; +import * as _dmm from "https://deno.land/x/dmm@v1.0.2/mod.ts"; +import * as _drash from "https://deno.land/x/drash@v1.0.2/mod.ts"; +import * as _bcrypt from "https://deno.land/x/bcrypt@v0.2.0/mod.ts"; diff --git a/deps.ts b/deps.ts index c115ee9..4970e9a 100644 --- a/deps.ts +++ b/deps.ts @@ -9,7 +9,7 @@ export { join, relative, resolve, -} from "https://x.nest.land/std@0.80.0/path/mod.ts"; +} from "https://x.nest.land/std@0.93.0/path/mod.ts"; export { exists, @@ -17,38 +17,38 @@ export { expandGlob, expandGlobSync, walkSync, -} from "https://x.nest.land/std@0.80.0/fs/mod.ts"; +} from "https://x.nest.land/std@0.93.0/fs/mod.ts"; -export * as log from "https://x.nest.land/std@0.80.0/log/mod.ts"; +export * as log from "https://x.nest.land/std@0.93.0/log/mod.ts"; -export { LogRecord } from "https://x.nest.land/std@0.80.0/log/logger.ts"; +export { LogRecord } from "https://x.nest.land/std@0.93.0/log/logger.ts"; -export type { LevelName } from "https://x.nest.land/std@0.80.0/log/levels.ts"; -export { LogLevels } from "https://x.nest.land/std@0.80.0/log/levels.ts"; +export type { LevelName } from "https://x.nest.land/std@0.93.0/log/levels.ts"; +export { LogLevels } from "https://x.nest.land/std@0.93.0/log/levels.ts"; -export { BaseHandler } from "https://x.nest.land/std@0.80.0/log/handlers.ts"; +export { BaseHandler } from "https://x.nest.land/std@0.93.0/log/handlers.ts"; -export * from "https://x.nest.land/std@0.80.0/fmt/colors.ts"; +export * from "https://x.nest.land/std@0.93.0/fmt/colors.ts"; export { assert, assertEquals, assertMatch, -} from "https://x.nest.land/std@0.80.0/testing/asserts.ts"; +} from "https://x.nest.land/std@0.93.0/testing/asserts.ts"; export { parse as parseYaml, stringify as stringifyYaml, -} from "https://x.nest.land/std@0.80.0/encoding/yaml.ts"; +} from "https://x.nest.land/std@0.93.0/encoding/yaml.ts"; /**************** cliffy ****************/ export { Command, CompletionsCommand, HelpCommand, -} from "https://x.nest.land/cliffy@0.16.0/command/mod.ts"; +} from "https://x.nest.land/cliffy@0.18.2/command/mod.ts"; -export { string as stringType } from "https://x.nest.land/cliffy@0.16.0/flags/types/string.ts"; +export { string as stringType } from "https://x.nest.land/cliffy@0.18.2/flags/types/string.ts"; export { Checkbox, @@ -56,9 +56,9 @@ export { Input, List, Select, -} from "https://x.nest.land/cliffy@0.16.0/prompt/mod.ts"; +} from "https://x.nest.land/cliffy@0.18.2/prompt/mod.ts"; -export type { ITypeInfo } from "https://x.nest.land/cliffy@0.16.0/flags/types.ts"; +export type { ITypeInfo } from "https://x.nest.land/cliffy@0.18.2/flags/types.ts"; /**************** semver ****************/ export * as semver from "https://deno.land/x/semver@v1.0.0/mod.ts"; @@ -83,4 +83,4 @@ export type { DependencyTree } from "https://x.nest.land/analyzer@0.0.6/deno/tre export { dependencyTree } from "https://x.nest.land/analyzer@0.0.6/deno/tree.ts"; /**************** wait ****************/ -export { Spinner, wait } from "https://deno.land/x/wait@0.1.7/mod.ts"; +export { Spinner, wait } from "https://deno.land/x/wait@0.1.10/mod.ts"; diff --git a/eggs.ts b/eggs.ts index 8365e7d..58797a7 100644 --- a/eggs.ts +++ b/eggs.ts @@ -58,7 +58,7 @@ const eggs = new Command() { global: true }, ) .action(() => { - eggs.help(); + eggs.showHelp(); }) .command("help", new HelpCommand()) .command("completions", new CompletionsCommand()) @@ -91,9 +91,9 @@ try { ) { const command = Deno.args[0] as keyof typeof commands; if (command in commands) { - commands[command].help(); + commands[command].showHelp(); } else { - eggs.help(); + eggs.showHelp(); } log.error(err.message); } else { diff --git a/src/api/common.ts b/src/api/common.ts index c6f644f..f042528 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -3,10 +3,10 @@ import { envENDPOINT } from "../utilities/environment.ts"; export const ENDPOINT = envENDPOINT(); // TODO(@qu4k): develop mock api -let MOCK = false; +let _MOCK = false; export function enableMockApi() { - MOCK = true; + _MOCK = true; } export async function apiFetch( diff --git a/src/commands/init.ts b/src/commands/init.ts index 5628f1e..0c8a540 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -1,6 +1,5 @@ import { basename, - Checkbox, Command, Confirm, Input, diff --git a/src/commands/install.ts b/src/commands/install.ts index 5e8b474..5d77288 100644 --- a/src/commands/install.ts +++ b/src/commands/install.ts @@ -1,4 +1,4 @@ -import { Command, installHatcher, log } from "../../deps.ts"; +import { Command, installHatcher } from "../../deps.ts"; import type { DefaultOptions } from "../commands.ts"; import { version } from "../version.ts"; import { setupLog } from "../utilities/log.ts"; @@ -11,7 +11,7 @@ export async function install( /** help option need to be parsed manually */ if (["-h", "--help", "help"].includes(args[0])) { - installCommand.help(); + installCommand.showHelp(); return; } diff --git a/src/commands/publish.ts b/src/commands/publish.ts index e142527..0c2e0a9 100644 --- a/src/commands/publish.ts +++ b/src/commands/publish.ts @@ -1,23 +1,21 @@ import { - basename, + basename as _basename, bold, Command, Confirm, - dependencyTree, + dependencyTree as _dependencyTree, dim, - dirname, + dirname as _dirname, existsSync, globToRegExp, gray, green, isVersionUnstable, italic, - join, + join as _join, log, relative, semver, - stringType, - yellow, } from "../../deps.ts"; import type { DefaultOptions } from "../commands.ts"; import { releaseType, urlType, versionType } from "../utilities/types.ts"; @@ -95,7 +93,7 @@ function ensureFiles(config: Config, matched: MatchedFile[]): boolean { return true; } -async function deprecationWarnings(config: Config) { +async function deprecationWarnings(_config: Config) { // no deprecated feature for the time being :) } @@ -204,7 +202,8 @@ async function checkUp( } } - if (config.checkInstallation ?? config.check) { + // Test disabled: analyzer is still unstable + /* if (config.checkInstallation ?? config.check) { const wait = spinner.info("Test installation..."); const tempDir = await Deno.makeTempDir(); for (let i = 0; i < matched.length; i++) { @@ -236,7 +235,7 @@ async function checkUp( } return false; } - } + } */ return true; } diff --git a/src/context/ignore.ts b/src/context/ignore.ts index b24e93a..8f25075 100644 --- a/src/context/ignore.ts +++ b/src/context/ignore.ts @@ -97,7 +97,7 @@ export function parseIgnore( } else { ignore.denies.push(pattern); } - } catch (err) { + } catch { log.error(`Parsing ${name} file. Error at line ${i + 1}`); } } diff --git a/src/schema.json b/src/schema.json index 542e048..f4de746 100644 --- a/src/schema.json +++ b/src/schema.json @@ -79,4 +79,4 @@ "default": true } } -} \ No newline at end of file +} diff --git a/src/utilities/types.ts b/src/utilities/types.ts index 7813644..e70685b 100644 --- a/src/utilities/types.ts +++ b/src/utilities/types.ts @@ -1,4 +1,4 @@ -import { ITypeInfo, semver, stringType } from "../../deps.ts"; +import { ITypeInfo, semver } from "../../deps.ts"; export const releases = [ "patch", diff --git a/src/version.ts b/src/version.ts index b44e387..d144a25 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = "0.3.5"; +export const version = "0.3.6";