Skip to content

Fix resolving against the working directory in legacy API - #212

Merged
nex3 merged 2 commits into
sass:mainfrom
ntkme:fix-legacy-import-cwd
Apr 6, 2023
Merged

Fix resolving against the working directory in legacy API#212
nex3 merged 2 commits into
sass:mainfrom
ntkme:fix-legacy-import-cwd

Conversation

@ntkme

@ntkme ntkme commented Mar 21, 2023

Copy link
Copy Markdown
Contributor

The issue here is that currently process.cwd() is added in pluginThis, causing it to be missing in actual loadPaths.
This PR modifies the logic to add process.cwd() in adjustOptions so that it affect actual loadPaths.

sass/sass-spec#1893

@nex3
nex3 self-requested a review March 27, 2023 20:46
@nex3

nex3 commented Mar 30, 2023

Copy link
Copy Markdown
Contributor

Can you enable the corresponding JS API tests for this?

@ntkme

ntkme commented Mar 31, 2023

Copy link
Copy Markdown
Contributor Author

@nex3 Regression test added. Test is passing here, but not passing in the spec repo as it looks like spec repo does not have support of cloning linked PR for embedded host.

@nex3

nex3 commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

Yeah, tests in the spec repo that add tests for the JS API should add "[skip sass-embedded]" to their description to avoid running tests against the base version.

nex3 added a commit to sass/dart-sass that referenced this pull request Apr 5, 2023
@nex3
nex3 merged commit c537b03 into sass:main Apr 6, 2023
nex3 added a commit to sass/dart-sass that referenced this pull request Apr 6, 2023
@ntkme
ntkme deleted the fix-legacy-import-cwd branch April 6, 2023 00:40
jgerigmeyer added a commit to oddbird/dart-sass that referenced this pull request Apr 6, 2023
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

Successfully merging this pull request may close these issues.

Import failure with sass.compile(), sassEmbedded.renderSync() and sassEmbedded.compile() methods, but not with sass.renderSync() method

2 participants