Skip to content

Commit

Permalink
fix(@whook/create): fix the npm init script
Browse files Browse the repository at this point in the history
  • Loading branch information
nfroidure committed Feb 28, 2024
1 parent f2584fd commit 8ab2b10
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 195 deletions.
244 changes: 122 additions & 122 deletions packages/whook-create/src/services/__snapshots__/createWhook.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,15 @@ exports[`initCreateWhook should fail with access problems 2`] = `
"oraCalls": [],
"oraStartCalls": [],
"oraStopAndPersistCalls": [],
"readFileCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
"outputFileCalls": [
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/src/config",
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
],
],
"writeFileCalls": [
[
"/home/whoiam/projects/yolo/README.md",
"# super-project
Expand Down Expand Up @@ -271,14 +263,6 @@ DEV_MODE=1
"/home/whoiam/projects/yolo/LICENSE",
"Copyright Wayne Campbell, all rights reserved.",
],
[
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
],
[
"/home/whoiam/projects/yolo/.gitignore",
"node_modules
Expand All @@ -289,6 +273,22 @@ builds/
",
],
],
"readFileCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/src/config",
],
],
}
`;

Expand Down Expand Up @@ -363,29 +363,15 @@ exports[`initCreateWhook should handle git initialization problems 2`] = `
},
],
],
"readFileCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
"outputFileCalls": [
[
"/var/lib/node/node_modules/whook-example/README.md",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
],
],
"writeFileCalls": [
[
"/home/whoiam/projects/yolo/README.md",
"# super-project
Expand Down Expand Up @@ -611,14 +597,6 @@ DEV_MODE=1
"/home/whoiam/projects/yolo/LICENSE",
"Copyright Wayne Campbell, all rights reserved.",
],
[
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
],
[
"/home/whoiam/projects/yolo/.gitignore",
"node_modules
Expand All @@ -629,6 +607,28 @@ builds/
",
],
],
"readFileCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
],
}
`;

Expand Down Expand Up @@ -666,31 +666,31 @@ exports[`initCreateWhook should handle network issues 2`] = `
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/package.json" => "/home/whoiam/projects/yolo/package.json ("..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/package.json" => "/home/whoiam/projects/yolo/package.json ("..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/package-lock.json" => "/home/whoiam/projects/yolo/package-lock.json ("..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/package-lock.json" => "/home/whoiam/projects/yolo/package-lock.json ("..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/LICENSE" => "/home/whoiam/projects/yolo/LICENSE ("..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/LICENSE" => "/home/whoiam/projects/yolo/LICENSE ("..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/dist/index.js" => "/home/whoiam/projects/yolo/dist/index.js ("../..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/dist/index.js" => "/home/whoiam/projects/yolo/dist/index.js ("../..").",
],
[
"debug",
"Moving "/var/lib/node/node_modules/whook-example/src/index.js" => "/home/whoiam/projects/yolo/src/index.js".",
"💱 - Moving "/var/lib/node/node_modules/whook-example/src/index.js" => "/home/whoiam/projects/yolo/src/index.js".",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/coverage/index.html" => "/home/whoiam/projects/yolo/coverage/index.html ("../..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/coverage/index.html" => "/home/whoiam/projects/yolo/coverage/index.html ("../..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/node_modules/whook/index.js" => "/home/whoiam/projects/yolo/node_modules/whook/index.js ("../../..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/node_modules/whook/index.js" => "/home/whoiam/projects/yolo/node_modules/whook/index.js ("../../..").",
],
[
"error",
Expand Down Expand Up @@ -735,29 +735,15 @@ exports[`initCreateWhook should handle network issues 2`] = `
},
],
],
"readFileCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
"outputFileCalls": [
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
],
],
"writeFileCalls": [
[
"/home/whoiam/projects/yolo/README.md",
"# super-project
Expand Down Expand Up @@ -983,13 +969,27 @@ DEV_MODE=1
"/home/whoiam/projects/yolo/LICENSE",
"Copyright Wayne Campbell, all rights reserved.",
],
],
"readFileCalls": [
[
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
],
}
Expand Down Expand Up @@ -1029,31 +1029,31 @@ exports[`initCreateWhook should work 2`] = `
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/package.json" => "/home/whoiam/projects/yolo/package.json ("..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/package.json" => "/home/whoiam/projects/yolo/package.json ("..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/package-lock.json" => "/home/whoiam/projects/yolo/package-lock.json ("..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/package-lock.json" => "/home/whoiam/projects/yolo/package-lock.json ("..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/LICENSE" => "/home/whoiam/projects/yolo/LICENSE ("..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/LICENSE" => "/home/whoiam/projects/yolo/LICENSE ("..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/dist/index.js" => "/home/whoiam/projects/yolo/dist/index.js ("../..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/dist/index.js" => "/home/whoiam/projects/yolo/dist/index.js ("../..").",
],
[
"debug",
"Moving "/var/lib/node/node_modules/whook-example/src/index.js" => "/home/whoiam/projects/yolo/src/index.js".",
"💱 - Moving "/var/lib/node/node_modules/whook-example/src/index.js" => "/home/whoiam/projects/yolo/src/index.js".",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/coverage/index.html" => "/home/whoiam/projects/yolo/coverage/index.html ("../..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/coverage/index.html" => "/home/whoiam/projects/yolo/coverage/index.html ("../..").",
],
[
"debug",
"Discarding "/var/lib/node/node_modules/whook-example/node_modules/whook/index.js" => "/home/whoiam/projects/yolo/node_modules/whook/index.js ("../../..").",
"💱 - Discarding "/var/lib/node/node_modules/whook-example/node_modules/whook/index.js" => "/home/whoiam/projects/yolo/node_modules/whook/index.js ("../../..").",
],
[
"warning",
Expand Down Expand Up @@ -1090,29 +1090,15 @@ exports[`initCreateWhook should work 2`] = `
},
],
],
"readFileCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
"outputFileCalls": [
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
],
],
"writeFileCalls": [
[
"/home/whoiam/projects/yolo/README.md",
"# super-project
Expand Down Expand Up @@ -1338,14 +1324,6 @@ DEV_MODE=1
"/home/whoiam/projects/yolo/LICENSE",
"Copyright Wayne Campbell, all rights reserved.",
],
[
"/home/whoiam/projects/yolo/src/watch.ts",
"
the watch.ts file contents
with'./' replaced so
equal to './'!
",
],
[
"/home/whoiam/projects/yolo/.gitignore",
"node_modules
Expand All @@ -1356,5 +1334,27 @@ builds/
",
],
],
"readFileCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
],
"readdirCalls": [
[
"/var/lib/node/node_modules/whook-example/package.json",
],
[
"/var/lib/node/node_modules/whook-example/src/watch.ts",
],
[
"/var/lib/node/node_modules/whook-example/README.md",
],
],
}
`;
Loading

0 comments on commit 8ab2b10

Please sign in to comment.