Skip to content

Commit

Permalink
Fix imports with path alias
Browse files Browse the repository at this point in the history
  • Loading branch information
0x80 committed Dec 17, 2023
1 parent 266e88d commit 619dc0c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/lib/lockfile/helpers/generate-npm-lockfile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Arborist from "@npmcli/arborist";
import fs from "node:fs/promises";
import path from "node:path";
import { useLogger } from "src/lib/logger";
import { useLogger } from "~/lib/logger";

/**
* Generate an isolated lockfile, based on the contents of node_modules in the
Expand Down
8 changes: 4 additions & 4 deletions src/lib/lockfile/helpers/generate-pnpm-lockfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
import assert from "node:assert";
import path from "node:path";
import { pick } from "ramda";
import { useConfig } from "src/lib/config";
import { useLogger } from "src/lib/logger";
import type { PackagesRegistry } from "src/lib/types";
import { useConfig } from "~/lib/config";
import { useLogger } from "~/lib/logger";
import type { PackagesRegistry } from "~/lib/types";
import { pnpmMapImporter } from "../process-lockfile";

export async function generatePnpmLockfile({
Expand All @@ -27,7 +27,7 @@ export async function generatePnpmLockfile({
const { includeDevDependencies } = useConfig();
const log = useLogger();

log.debug("Generating PNPM lockfile...");
log.info("Generating PNPM lockfile...");

const lockfile = await readWantedLockfile(workspaceRootDir, {
ignoreIncompatible: false,
Expand Down
6 changes: 3 additions & 3 deletions src/lib/manifest/helpers/adapt-internal-package-manifests.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fs from "fs-extra";
import path from "node:path";
import { omit } from "ramda";
import { useConfig } from "src/lib/config";
import { usePackageManager } from "src/lib/package-manager";
import type { PackagesRegistry } from "src/lib/types";
import { useConfig } from "~/lib/config";
import { usePackageManager } from "~/lib/package-manager";
import type { PackagesRegistry } from "~/lib/types";
import { adaptManifestInternalDeps } from "./adapt-manifest-internal-deps";

/**
Expand Down
4 changes: 2 additions & 2 deletions src/lib/manifest/helpers/adapt-manifest-internal-deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { omit } from "ramda";
import type { PackageManifest, PackagesRegistry } from "src/lib/types";
import { filterObjectUndefined } from "src/lib/utils";
import type { PackageManifest, PackagesRegistry } from "~/lib/types";
import { filterObjectUndefined } from "~/lib/utils";
import { patchInternalEntries } from "./patch-internal-entries";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/lib/package-manager/helpers/infer-from-manifest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from "fs-extra";
import assert from "node:assert";
import path from "node:path";
import { useLogger } from "src/lib/logger";
import { useLogger } from "~/lib/logger";
import type { PackageManifest } from "../../types";
import { readTypedJsonSync } from "../../utils";
import type { PackageManagerName } from "../names";
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"skipLibCheck": true,
"rootDir": "src",
"outDir": "dist",
"baseUrl": "."
"baseUrl": ".",
"paths": {
"~/*": ["src/*"]
}
},
"include": ["src"],
"exclude": ["dist", "node_modules"]
Expand Down

0 comments on commit 619dc0c

Please sign in to comment.