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

fix(utils): nuxt.config.js is not in cwd #9701

Open
wants to merge 4 commits into
base: 2.x
Choose a base branch
from

Conversation

harishsg99
Copy link

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)

Description

this resolves #9640

Checklist:

  • All new and existing tests are passing.

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2021

Codecov Report

Merging #9701 (f411374) into dev (b014777) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #9701   +/-   ##
=======================================
  Coverage   65.17%   65.17%           
=======================================
  Files          94       94           
  Lines        4109     4109           
  Branches     1127     1127           
=======================================
  Hits         2678     2678           
  Misses       1152     1152           
  Partials      279      279           
Flag Coverage Δ
unittests 65.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/cli/src/utils/generate.js 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b014777...f411374. Read the comment docs.

@clarkdo clarkdo changed the title Fixed /nuxt.config.js is not in cwd issue fix(utils): nuxt.config.js is not in cwd Aug 23, 2021
@clarkdo clarkdo requested a review from pi0 August 23, 2021 08:42
clarkdo
clarkdo previously approved these changes Aug 23, 2021
@@ -169,7 +169,7 @@ export async function snapshot ({ globbyOptions, ignore, rootDir }) {
const files = await globby('**/*.*', {
...globbyOptions,
ignore,
cwd: rootDir,
cwd: path.normalize(rootDir),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better normalizing the path directly in @nuxt/config (here) otherwise we will have inconsistent behavior.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also check whether it works with upath.normalize as that is what we use elsewhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One downside of upath, is that it seems not supporting windows network mounts (that might be currently used by nuxt2 users). If path.normalize solving issue with globby is less risky change (till we have unpath for better normalization)

@ranulf10

This comment has been minimized.

@ranulf10
Copy link

ranulf10 commented Oct 19, 2021 via email

@danielroe danielroe added the 2.x label Jan 18, 2023
@danielroe danielroe added the bug label Feb 1, 2023
@danielroe
Copy link
Member

@harishsg99 Would you confirm whether this change is still needed on the latest 2.16.2 (which has a newer version of globby than when you submitted this PR)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/nuxt.config.js is not in cwd
6 participants