npm command | Yarn command | pnpm equivalent | bun equivalent |
---|---|---|---|
npm install | yarn | pnpm install | bun install |
npm install [pkg] | yarn add [pkg] | pnpm add [pkg] | bun add [pkg] |
npm uninstall [pkg] | yarn remove [pkg] | pnpm remove [pkg] | bun remove [pkg] |
npm update | yarn upgrade | pnpm update | bun update |
npm list | yarn list | pnpm list | ? |
npm run [scriptName] | yarn [scriptName] | pnpm [scriptName] | bun run [scriptName] |
npx [command] | yarn dlx [command] | pnpm dlx [command] | bunx [command] |
npm exec | yarn exec [c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/testing/time_helpers' | |
# the class below could have any name | |
class Tempo | |
include ActiveSupport::Testing::TimeHelpers | |
end | |
# any desidered date | |
desired_date = Date.today - 2.days |