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

Possible bug related to --dist #15

Closed
ayuhito opened this issue Jun 29, 2022 · 1 comment
Closed

Possible bug related to --dist #15

ayuhito opened this issue Jun 29, 2022 · 1 comment

Comments

@ayuhito
Copy link
Contributor

ayuhito commented Jun 29, 2022

While writing some tests for #11, I was a little confused about this test for the --dist flag.

Is it intended for the command to be used as pkgroll --dist ./nested or as written in the test pkgroll --dist .? I'm not sure if I agree with the test in this case as being intended behaviour.

I was originally intending to use distPath for #11, but that wouldn't work with the current --dist flag setup since we'd be cleaning the . dir instead of ./nested.

Switching it pkgroll --dist ./nested in the test results in the following error:

/home/lotus/pkgroll/node_modules/.pnpm/execa@6.1.0/node_modules/execa/lib/error.js:59
                error = new Error(message);
                        ^

Error: Command failed with exit code 1: /home/lotus/.cache/nve/12.22.9/x64/bin/node /home/lotus/pkgroll/dist/cli.js --dist ./nested
Error: Could not find mathing source file for export path "./nested/index.d.ts"
    at tD (/home/lotus/pkgroll/dist/cli-0d8a4c1f.js:21:5041)
    at async /home/lotus/pkgroll/dist/cli-0d8a4c1f.js:37:19127
    at async Promise.all (index 2)
    at async /home/lotus/pkgroll/dist/cli-0d8a4c1f.js:37:19086
    at null.makeError (/home/lotus/pkgroll/node_modules/.pnpm/execa@6.1.0/node_modules/execa/lib/error.js:59:11)
    at null.handlePromise (/home/lotus/pkgroll/node_modules/.pnpm/execa@6.1.0/node_modules/execa/index.js:119:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at null.pkgroll (/home/lotus/pkgroll/tests/utils/pkgroll.ts:18:6)
    at null.<anonymous> (/home/lotus/pkgroll/tests/specs/builds/src-dist.ts:88:27)
    at null.<anonymous> (/home/lotus/pkgroll/node_modules/.pnpm/manten@0.0.3/node_modules/manten/dist/index.js:36:9) {
  shortMessage: 'Command failed with exit code 1: /home/lotus/.cache/nve/12.22.9/x64/bin/node /home/lotus/pkgroll/dist/cli.js --dist ./nested',
  command: '/home/lotus/.cache/nve/12.22.9/x64/bin/node /home/lotus/pkgroll/dist/cli.js --dist ./nested',
  escapedCommand: '"/home/lotus/.cache/nve/12.22.9/x64/bin/node" "/home/lotus/pkgroll/dist/cli.js" --dist "./nested"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'Error: Could not find mathing source file for export path "./nested/index.d.ts"\n' +
    '    at tD (/home/lotus/pkgroll/dist/cli-0d8a4c1f.js:21:5041)\n' +
    '    at async /home/lotus/pkgroll/dist/cli-0d8a4c1f.js:37:19127\n' +
    '    at async Promise.all (index 2)\n' +
    '    at async /home/lotus/pkgroll/dist/cli-0d8a4c1f.js:37:19086',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Possibly related to the dts plugin not taking in the dist arg properly? I could dig around a little if you have any clues which file may be related.

@privatenumber
Copy link
Owner

Closing as this seems stale. Feel free to file a new issue if it comes up again

@privatenumber privatenumber closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants