Skip to content
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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isolate-package",
"version": "1.17.0",
"version": "1.18.0-0",
"description": "Isolate a monorepo package with its shared dependencies to form a self-contained directory, compatible with Firebase deploy",
"author": "Thijs Koerselman",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/isolate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export async function isolate(
log.debug("Generating pnpm-workspace.yaml for Rush workspace");
log.debug("Packages folder names:", packagesFolderNames);

const packages = packagesFolderNames.map((x) => x + "/*");
const packages = packagesFolderNames.map((x) => path.join(x, "/*"));

await writeTypedYamlSync(path.join(isolateDir, "pnpm-workspace.yaml"), {
packages,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/registry/create-packages-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export async function createPackagesRegistry(

if (!fs.existsSync(manifestPath)) {
log.warn(
`Ignoring directory ./${rootRelativeDir} because it does not contain a package.json file`
`Ignoring directory ${rootRelativeDir} because it does not contain a package.json file`
);
return;
} else {
log.debug(`Registering package ./${rootRelativeDir}`);
log.debug(`Registering package ${rootRelativeDir}`);

const manifest = await readTypedJson<PackageManifest>(
path.join(absoluteDir, "package.json")
Expand Down
10 changes: 4 additions & 6 deletions src/lib/utils/get-relative-path.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { join } from "node:path";

export function getRootRelativePath(path: string, rootPath: string) {
const strippedPath = path.replace(rootPath, "");

return strippedPath.startsWith("/")
? `(root)${strippedPath}`
: `(root)/${strippedPath}`;
return join("(root)", strippedPath);
}

export function getIsolateRelativePath(path: string, isolatePath: string) {
const strippedPath = path.replace(isolatePath, "");

return strippedPath.startsWith("/")
? `(isolate)${strippedPath}`
: `(isolate)/${strippedPath}`;
return join("(isolate)", strippedPath);
}