Skip to content

Conversation

@GaryJones
Copy link
Contributor

Summary

This PR migrates the project from Yarn to npm and replaces the deprecated node-sass package with the modern sass package. This is the first step in addressing the security vulnerabilities identified in #700.

Changes

  • ✅ Remove yarn.lock and generate package-lock.json
  • ✅ Replace deprecated [email protected] with [email protected]
  • ✅ Update sass-loader from v6.0.6 to v7.3.1 (compatible with sass)
  • ✅ Update .gitignore to use *.log instead of yarn-error.log
  • ✅ Update .distignore to reference package-lock.json instead of yarn.lock
  • ✅ Rebuild assets with new build configuration

Why

  1. Yarn → npm: npm has significantly improved since Yarn's initial release. Consolidating on one package manager simplifies the development workflow and CI/CD pipelines.

  2. node-sass → sass: node-sass is deprecated and doesn't support ARM64 architecture (Apple Silicon). The sass package (Dart Sass) is the primary implementation and is actively maintained.

  3. 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 install completes successfully
  • npm run build produces working assets
  • ✅ No PHP code changes (WordPress plugin functionality unaffected)

Risk 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:

  1. Update runtime dependencies (moment, etc.) - Outdated packages with vulnerabilities #700
  2. Migrate to @wordpress/scripts for modern build tooling - Outdated packages with vulnerabilities #700

🤖 Generated with Claude Code

This addresses dependency management issues and ARM64 compatibility.

Changes:
- Remove yarn.lock and add package-lock.json
- Replace deprecated node-sass with modern sass package
- Update sass-loader from v6 to v7 (compatible with sass)
- Update .gitignore to use *.log instead of yarn-error.log
- Update .distignore to include package-lock.json instead of yarn.lock
- Rebuild assets with new build configuration

This is the first step toward resolving security vulnerabilities.
The migration enables npm-based workflows and fixes compatibility
with ARM64 architecture (Apple Silicon).

Build tested successfully. No PHP code changes.

Ref #700

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@GaryJones GaryJones self-assigned this Nov 9, 2025
@GaryJones GaryJones added dependencies Dependency updates type: maintenance Routine maintenance and code quality improvements labels Nov 9, 2025
@GaryJones GaryJones merged commit 690ce57 into develop Nov 9, 2025
15 checks passed
@GaryJones GaryJones deleted the fix/700-migrate-yarn-to-npm branch November 9, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates type: maintenance Routine maintenance and code quality improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants