build: migrate from Yarn to npm and replace node-sass with sass #712
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates the project from Yarn to npm and replaces the deprecated
node-sasspackage with the modernsasspackage. This is the first step in addressing the security vulnerabilities identified in #700.Changes
yarn.lockand generatepackage-lock.json[email protected]with[email protected]sass-loaderfrom v6.0.6 to v7.3.1 (compatible withsass).gitignoreto use*.loginstead ofyarn-error.log.distignoreto referencepackage-lock.jsoninstead ofyarn.lockWhy
Yarn → npm: npm has significantly improved since Yarn's initial release. Consolidating on one package manager simplifies the development workflow and CI/CD pipelines.
node-sass → sass:
node-sassis deprecated and doesn't support ARM64 architecture (Apple Silicon). Thesasspackage (Dart Sass) is the primary implementation and is actively maintained.Security: This migration is necessary before we can effectively address the npm security vulnerabilities, as it regenerates the dependency lock file with current versions.
Testing
npm installcompletes successfullynpm run buildproduces working assetsRisk Assessment
Risk Level: Low
This change only affects the development build process and does not modify any runtime PHP code or JavaScript application logic. The built assets are functionally identical to the previous build.
Related Issues
Next Steps
After this PR is merged, subsequent PRs will:
@wordpress/scriptsfor modern build tooling - Outdated packages with vulnerabilities #700🤖 Generated with Claude Code