Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump typescript from 4.9.5 to 5.0.4 #155

Merged
merged 3 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"tap": "16.3.4",
"test": "3.3.0",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.0.4"
},
"moker": {
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"tempy": "3.0.0",
"test": "3.3.0",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.0.4"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { isReadableAndWritableFile, readFile, writeFile } from "./file.js";
import {
deepmerge,
isPlainObject,
JSONValue,
StringableJSONValue,
type JSONValue,
type StringableJSONValue,
} from "./utils/index.js";

export async function readJson<T extends JSONValue>({
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/monorepo.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { join } from "node:path";
import { Package, readPackage } from "./package.js";
import { readPackage, type Package } from "./package.js";
import {
createRepo,
CreateRepoOptions,
DEFAULT_LICENSE,
createRepo,
isRepo,
type CreateRepoOptions,
} from "./repo.js";
import { addYarnPlugin } from "./yarn.js";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import hostedGitInfo from "hosted-git-info";
import { basename, join } from "node:path";
import { isDirectory, isReadableAndWritableDirectory } from "./directory.js";
import { generateLicense } from "./license.js";
import { hasPackage, Package, writePackage } from "./package.js";
import { hasPackage, writePackage, type Package } from "./package.js";
import { exec, getAuthor } from "./utils/index.js";
import { writeReadme } from "./workspace.js";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import deepmerge from "deepmerge";
import yaml from "yaml";

import { isReadableAndWritableFile, readFile, writeFile } from "./file.js";
import { isPlainObject, JSONValue } from "./utils/types.js";
import { isPlainObject, type JSONValue } from "./utils/types.js";

export async function readYaml<T extends JSONValue>({
path,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"devDependencies": {
"@types/node": "18.16.3",
"typescript": "4.9.5"
"typescript": "5.0.4"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/dependabot/dependabot.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
hasPlugin,
PluginArgs,
PluginType,
hasPlugin,
readYaml,
removeFile,
writeYaml,
type PluginArgs,
} from "@mokr/core";
import { join } from "node:path";

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/src/devcontainer/devcontainer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { hasPlugin, PluginArgs, PluginType } from "@mokr/core";
import { PluginType, hasPlugin, type PluginArgs } from "@mokr/core";
import {
readDevcontainerJson,
removeDevcontainerJson,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/doctoc/doctoc.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
hasPlugin,
PluginArgs,
PluginType,
updatePackage,
writePackage,
type PluginArgs,
} from "@mokr/core";
import {
addPreCommitHookCommand,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/esbuild/esbuild.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
getMonorepoDirectory,
hasPlugin,
PluginArgs,
PluginType,
updatePackage,
warning,
writeGitignore,
writePackage,
type PluginArgs,
} from "@mokr/core";

async function install({ directory }: PluginArgs) {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/githubActions/githubActions.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
PluginType,
copyFile,
hasPlugin,
PluginArgs,
PluginType,
removeDirectory,
type PluginArgs,
} from "@mokr/core";
import { join } from "node:path";
import { URL } from "node:url";
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/husky/husky.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {
PluginType,
enqueueRemoveDependency,
exec,
installDependency,
isMonorepo,
isReadableAndWritableFile,
PluginArgs,
PluginType,
readFile,
removeDirectory,
removeFile,
updatePackage,
warning,
writeFile,
writePackage,
type PluginArgs,
} from "@mokr/core";
import os from "node:os";
import { join } from "node:path";
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/jest/jest.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
getMonorepoDirectory,
hasPlugin,
PluginArgs,
PluginType,
removeFile,
warning,
writeFile,
writePackage,
type PluginArgs,
} from "@mokr/core";
import { join } from "path";

Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/lintStaged/lintStaged.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
hasPlugin,
PluginArgs,
PluginType,
updatePackage,
writePackage,
type PluginArgs,
} from "@mokr/core";
import {
addPreCommitHookCommand,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/prettier/prettier.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
PluginArgs,
PluginType,
removeFile,
updatePackage,
writeFile,
writePackage,
type PluginArgs,
} from "@mokr/core";
import os from "node:os";
import { join } from "node:path";
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/semanticRelease/semanticRelease.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
PluginArgs,
PluginType,
removeFile,
writeJson,
writePackage,
type PluginArgs,
} from "@mokr/core";
import { join } from "node:path";

Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/test/test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
getMonorepoDirectory,
hasPlugin,
PluginArgs,
PluginType,
warning,
writePackage,
type PluginArgs,
} from "@mokr/core";

async function install({ directory }: PluginArgs) {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/todos/todos.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
hasPlugin,
PluginArgs,
PluginType,
updatePackage,
writePackage,
type PluginArgs,
} from "@mokr/core";
import {
addPreCommitHookCommand,
Expand Down
76 changes: 2 additions & 74 deletions packages/plugins/src/typescript/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,7 @@ type CompilerOptionsDefinition = {
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
stripInternal?: boolean;
target?:
| "es3"
| "es5"
| "es6"
| "es2015"
| "es2016"
| "es2017"
| "es2018"
| "es2019"
| "es2020"
| "es2021"
| "es2022"
| "esnext";
target?: string;
watch?: boolean;
experimentalDecorators?: boolean;
emitDecoratorMetadata?: boolean;
Expand Down Expand Up @@ -112,67 +100,7 @@ type CompilerOptionsDefinition = {
noImplicitUseStrict?: boolean;
listEmittedFiles?: boolean;
disableSizeLimit?: boolean;
lib?: (
| "es5"
| "es6"
| "es7"
| "es2015"
| "es2015.collection"
| "es2015.core"
| "es2015.generator"
| "es2015.iterable"
| "es2015.promise"
| "es2015.proxy"
| "es2015.reflect"
| "es2015.symbol.wellknown"
| "es2015.symbol"
| "es2016"
| "es2016.array.include"
| "es2017"
| "es2017.intl"
| "es2017.object"
| "es2017.sharedmemory"
| "es2017.string"
| "es2017.typedarrays"
| "es2018"
| "es2018.asynciterable"
| "es2018.intl"
| "es2018.promise"
| "es2018.regexp"
| "es2019"
| "es2019.array"
| "es2019.object"
| "es2019.string"
| "es2019.symbol"
| "es2020"
| "es2020.bigint"
| "es2020.promise"
| "es2020.string"
| "es2020.symbol.wellknown"
| "es2021"
| "es2021.promise"
| "es2021.string"
| "es2021.weakref"
| "es2022"
| "es2022.array"
| "es2022.error"
| "es2022.full"
| "es2022.intl"
| "es2022.object"
| "es2022.sharedmemory"
| "es2022.string"
| "esnext"
| "esnext.array"
| "esnext.asynciterable"
| "esnext.bigint"
| "esnext.intl"
| "esnext.symbol"
| "dom"
| "dom.iterable"
| "scripthost"
| "webworker"
| "webworker.importscripts"
)[];
lib?: string[];
strictNullChecks?: boolean;
maxNodeModuleJsDepth?: number;
importHelpers?: boolean;
Expand Down
14 changes: 7 additions & 7 deletions packages/plugins/src/typescript/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import {
PluginType,
addYarnPlugin,
enqueueInstallDependency,
enqueueRemoveDependency,
getMonorepoDirectory,
PluginArgs,
PluginType,
removeYarnPlugin,
warning,
writeGitignore,
writePackage,
type PluginArgs,
} from "@mokr/core";
import deepmerge from "deepmerge";
import { removeTsconfig, Tsconfig, writeTsconfig } from "./tsconfig.js";
import { removeTsconfig, writeTsconfig, type Tsconfig } from "./tsconfig.js";

const TSCONFIG_WORKSPACE: Tsconfig = {
compilerOptions: {
Expand All @@ -22,19 +22,20 @@ const TSCONFIG_WORKSPACE: Tsconfig = {
include: ["src/**/*"],
};

// https://github.com/tsconfig/bases/blob/main/bases/node18-strictest-esm.combined.json
// https://github.com/tsconfig/bases/tree/main/bases
const TSCONFIG_BASE: Tsconfig = {
$schema: "https://json.schemastore.org/tsconfig",
display: "Node 18 + ESM + Strictest",
display: "Node 20 + ESM + Strictest",
compilerOptions: {
lib: ["es2022"],
lib: ["es2023"],
module: "es2022",
target: "es2022",
strict: true,
esModuleInterop: true,
skipLibCheck: true,
forceConsistentCasingInFileNames: true,
moduleResolution: "node",
verbatimModuleSyntax: true,
allowUnusedLabels: false,
allowUnreachableCode: false,
exactOptionalPropertyTypes: true,
Expand All @@ -45,7 +46,6 @@ const TSCONFIG_BASE: Tsconfig = {
noUncheckedIndexedAccess: true,
noUnusedLocals: true,
noUnusedParameters: true,
importsNotUsedAsValues: "error",

// Custom
declaration: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/xv/xv.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
PluginType,
enqueueInstallDependency,
enqueueRemoveDependency,
getMonorepoDirectory,
hasPlugin,
PluginArgs,
PluginType,
warning,
writePackage,
type PluginArgs,
} from "@mokr/core";

async function install({ directory }: PluginArgs) {
Expand Down
Loading