Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gruntjs/grunt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8fcbed1fe80086fe9e68f044084e19296d314d35
Choose a base ref
...
head repository: gruntjs/grunt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0afeb5c631199d806fa560c680987dd907263b83
Choose a head ref

Commits on Feb 7, 2015

  1. Copy the full SHA
    2043b8e View commit details

Commits on Jan 2, 2017

  1. Expose option keys

    brian-lim-42 committed Jan 2, 2017
    Copy the full SHA
    85e5246 View commit details

Commits on Apr 24, 2019

  1. Remove coffeescript from dependencies.

    To ease transition, if the coffeescript package is still around, Grunt will
    attempt to load it. If it is not, and the user loads a CoffeeScript file,
    Grunt will print a useful error indicating that the coffeescript package
    should be installed as a dev dependency.
    STRML committed Apr 24, 2019
    Copy the full SHA
    ba492b6 View commit details

Commits on Apr 29, 2019

  1. support monorepos

    allow usage of grunt plugins that are located in any location that
    is visible to Node.js and NPM, instead of `node_modules` directly
    inside package that have a dev dependency to these plugins.
    micellius committed Apr 29, 2019
    Copy the full SHA
    d06ca51 View commit details
  2. support monorepo (as fallback)

    In `loadNpmTasks()`` try to resolve package location. In case package
    not found, try to resolve it's location using `require.resolve()`
    micellius committed Apr 29, 2019
    Copy the full SHA
    f2b118a View commit details
  3. support monorepo (test case)

    add integration test for monorepo case, where grunt plugin hoisted to
    the `node_modules` above package having dev dependency to it
    micellius committed Apr 29, 2019
    Copy the full SHA
    66fc8fa View commit details

Commits on May 13, 2019

  1. Update js-yaml dependecy to ~3.13.1 (#1680)

    Marla Glasser authored and vladikoff committed May 13, 2019
    2
    Copy the full SHA
    6795d31 View commit details

Commits on May 26, 2019

  1. support monorepo (relative path)

    In case `loadNpmTasks()` is called with relative path instead of just
    module name, try to resolve module name and find relevant package.json,
    but use tasks from specified relative path.
    micellius committed May 26, 2019
    Copy the full SHA
    5a0a02b View commit details

Commits on Jun 28, 2019

  1. HTTPS link to gruntjs.com (#1683)

    coliff authored and vladikoff committed Jun 28, 2019
    1
    Copy the full SHA
    75da17b View commit details

Commits on Oct 3, 2019

  1. Avoiding infinite loop on very long command names.

    If very long command names are registered, grunt --help runs
    out of memory trying to generate the help table. This commit
    adjusts the width to be at least 20 longer than the maximal
    command length.
    philz committed Oct 3, 2019
    Copy the full SHA
    7985b19 View commit details

Commits on Mar 15, 2020

  1. Update to mkdirp ~1.0.3

    vladikoff committed Mar 15, 2020
    Copy the full SHA
    f1898eb View commit details

Commits on Mar 17, 2020

  1. Copy the full SHA
    4bfa98e View commit details
  2. Fix up Buffer usage

    vladikoff committed Mar 17, 2020
    Copy the full SHA
    0a66968 View commit details
  3. Merge pull request #1705 from gruntjs/mkdirp-update

    Update to mkdirp ~1.0.3, Support versions of node >= 8
    vladikoff authored Mar 17, 2020
    Copy the full SHA
    6124409 View commit details
  4. v1.1.0

    vladikoff committed Mar 17, 2020
    Copy the full SHA
    4674c59 View commit details
  5. Merge pull request #1706 from gruntjs/tag-neew

    v1.1.0
    vladikoff authored Mar 17, 2020
    Copy the full SHA
    d5cdac0 View commit details

Commits on May 5, 2020

  1. add license link

    NotMoni authored May 5, 2020
    Copy the full SHA
    288ea76 View commit details

Commits on Jun 5, 2020

  1. add link to license

    NotMoni authored Jun 5, 2020
    Copy the full SHA
    169d496 View commit details
  2. Merge pull request #1709 from NotMoni/patch-1

    add license link
    vladikoff authored Jun 5, 2020
    Copy the full SHA
    4c6fcd9 View commit details

Commits on Jun 8, 2020

  1. Add CODE_OF_CONDUCT.md

    vladikoff authored Jun 8, 2020
    Copy the full SHA
    1f61427 View commit details

Commits on Jun 29, 2020

  1. Merge pull request #1677 from micellius/monorepo-support

    support monorepos
    vladikoff authored Jun 29, 2020
    Copy the full SHA
    58f80ae View commit details
  2. Merge pull request #1675 from STRML/remove-coffeescript

    Remove coffeescript from dependencies.
    vladikoff authored Jun 29, 2020
    Copy the full SHA
    5f16b5a View commit details

Commits on Jun 30, 2020

  1. Merge pull request #1283 from greglittlefield-wf/recognize-relative-l…

    …inks
    
    Fix issue where grunt.file.isLink() returned false for relative links
    vladikoff authored Jun 30, 2020
    Copy the full SHA
    bc168e3 View commit details
  2. fix lint in file.js

    vladikoff committed Jun 30, 2020
    Copy the full SHA
    cdd1c19 View commit details
  3. Merge pull request #1712 from gruntjs/fix-lint

    fix lint in file.js
    vladikoff authored Jun 30, 2020
    Copy the full SHA
    05c0634 View commit details

Commits on Jul 3, 2020

  1. Merge pull request #1697 from philz/1696

    Avoiding infinite loop on very long command names.
    vladikoff authored Jul 3, 2020
    Copy the full SHA
    ee70306 View commit details
  2. Merge pull request #1570 from bhldev/feature-options-keys

    FEATURE - Expose Grunt Option Keys for Ease of Use
    vladikoff authored Jul 3, 2020
    Copy the full SHA
    0d23eff View commit details
  3. Release v1.2.0

    vladikoff committed Jul 3, 2020
    Copy the full SHA
    64a3cf4 View commit details
  4. Merge pull request #1714 from gruntjs/release-1.2.0

    Release v1.2.0
    vladikoff authored Jul 3, 2020
    Copy the full SHA
    27bc5d9 View commit details

Commits on Jul 5, 2020

  1. Copy the full SHA
    e789b1f View commit details

Commits on Jul 7, 2020

  1. Merge pull request #1715 from sibiraj-s/remove-path-is-absolute

    Remove path-is-absolute dependency
    vladikoff authored Jul 7, 2020
    Copy the full SHA
    9d23cb6 View commit details
  2. Changelog update

    vladikoff committed Jul 7, 2020
    Copy the full SHA
    ae11839 View commit details
  3. 1.2.1

    vladikoff committed Jul 7, 2020
    Copy the full SHA
    3b75085 View commit details

Commits on Jul 27, 2020

  1. Bump legacy-log

    vladikoff committed Jul 27, 2020
    Copy the full SHA
    00d5907 View commit details
  2. Merge pull request #1718 from gruntjs/legacy-log-bumo

    Bump legacy-log
    vladikoff authored Jul 27, 2020
    Copy the full SHA
    7125f49 View commit details

Commits on Aug 17, 2020

  1. Switch to use safeLoad for loading YML files via file.readYAML.

    For previous behaviour please use the following:
    
    ```
    readYAML('test/fixtures/utf8.yaml', null, {unsafeLoad: true});
    ```
    vladikoff committed Aug 17, 2020
    Copy the full SHA
    e350cea View commit details

Commits on Aug 18, 2020

  1. Merge pull request #1719 from gruntjs/yaml-refactor

    Switch to use `safeLoad` for loading YML files via `file.readYAML`.
    vladikoff authored Aug 18, 2020
    Copy the full SHA
    7e669ac View commit details
  2. Copy the full SHA
    520fedb View commit details
  3. Merge pull request #1720 from gruntjs/update-changelog-deps

    Update Changelog and legacy-util dependency
    vladikoff authored Aug 18, 2020
    Copy the full SHA
    faab6be View commit details
  4. 1.3.0

    vladikoff committed Aug 18, 2020
    Copy the full SHA
    6f49017 View commit details

Commits on Oct 1, 2020

  1. Update deps

    vladikoff committed Oct 1, 2020
    Copy the full SHA
    4952368 View commit details

Commits on Oct 5, 2020

  1. Merge pull request #1722 from gruntjs/update-through

    Update deps
    vladikoff authored Oct 5, 2020
    Copy the full SHA
    e86db1c View commit details

Commits on Apr 22, 2021

  1. Update CLI and nodeunit

    vladikoff committed Apr 22, 2021
    Copy the full SHA
    47cf8b6 View commit details
  2. Merge pull request #1727 from gruntjs/update-deps-apr

    Update CLI and nodeunit
    vladikoff authored Apr 22, 2021
    Copy the full SHA
    49de70b View commit details
  3. Copy the full SHA
    106ed17 View commit details
  4. Merge pull request #1728 from gruntjs/update-deps-changelog

    Update changelog and util dep
    vladikoff authored Apr 22, 2021
    Copy the full SHA
    63b2e89 View commit details
  5. 1.4.0

    vladikoff committed Apr 22, 2021
    Copy the full SHA
    ffa6775 View commit details

Commits on May 23, 2021

  1. Copy the full SHA
    1b6e288 View commit details

Commits on May 24, 2021

  1. Update grunt-known-options

    vladikoff committed May 24, 2021
    Copy the full SHA
    eee0673 View commit details
  2. Switch to Actions

    vladikoff committed May 24, 2021
    Copy the full SHA
    08896ae View commit details
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Tests

on: [push, pull_request]

env:
FORCE_COLOR: 2

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [16, 18, 19]
os: [ubuntu-latest, windows-latest]

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm i

- name: Run tests
run: npm test

# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- name: Run PowerShell tests
run: "npm test # PowerShell" # Pass comment to PS for easier debugging
shell: powershell
if: startsWith(matrix.os, 'windows')
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.npm-debug.log
package-lock.json
tmp
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

69 changes: 69 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
v1.6.0
date: 2023-01-28
changes:
- Requires node.js 16+.
- template.date now uses dateformat ~4.6.2.
- other dependency updates such as glob, rimraf, etc.
v1.5.3
date: 2022-04-23
changes:
- Patch up race condition in symlink copying.
v1.5.2
date: 2022-04-12
changes:
- Unlink symlinks when copy destination is a symlink.
v1.5.1
date: 2022-04-11
changes:
- Fixed symlink destination handling.
v1.5.0
date: 2022-04-10
changes:
- Updated dependencies.
- Add symlink handling for copying files.
v1.4.1
date: 2021-05-24
changes:
- Fix --preload option to be a known option
- Switch to GitHub Actions
v1.4.0
date: 2021-04-21
changes:
- Security fixes in production and dev dependencies
- Liftup/Liftoff upgrade breaking change. Update your scripts to use --preload instead of --require. Ref: https://github.com/js-cli/js-liftoff/commit/e7a969d6706e730d90abb4e24d3cb4d3bce06ddb.
v1.3.0
date: 2020-08-18
changes:
- Switch to use `safeLoad` for loading YML files via `file.readYAML`.
- Upgrade legacy-log to ~3.0.0.
- Upgrade legacy-util to ~2.0.0.
v1.2.1
date: 2020-07-07
changes:
- Remove path-is-absolute dependency.
(PR: https://github.com/gruntjs/grunt/pull/1715)
v1.2.0
date: 2020-07-03
changes:
- Allow usage of grunt plugins that are located in any location that
is visible to Node.js and NPM, instead of node_modules directly
inside package that have a dev dependency to these plugins.
(PR: https://github.com/gruntjs/grunt/pull/1677)
- Removed coffeescript from dependencies. To ease transition, if
coffeescript is still around, Grunt will attempt to load it.
If it is not, and the user loads a CoffeeScript file,
Grunt will print a useful error indicating that the
coffeescript package should be installed as a dev dependency.
This is considerably more user-friendly than dropping the require entirely,
but doing so is feasible with the latest grunt-cli as users
may simply use grunt --require coffeescript/register.
(PR: https://github.com/gruntjs/grunt/pull/1675)
- Exposes Grunt Option keys for ease of use.
(PR: https://github.com/gruntjs/grunt/pull/1570)
- Avoiding infinite loop on very long command names.
(PR: https://github.com/gruntjs/grunt/pull/1697)
v1.1.0
date: 2020-03-16
changes:
- Update to mkdirp ~1.0.3
- Only support versions of Node >= 8
v1.0.4
date: 2019-04-22
changes:
114 changes: 114 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Code of Conduct

Grunt, The OpenJS Foundation and its member projects use [Contributor Covenant v2.0](https://contributor-covenant.org/version/2/0/code_of_conduct) as their code of conduct. The full text is included [below](#contributor-covenant-code-of-conduct) in English, and translations are available from the Contributor Covenant organisation:

- [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations)
- [github.com/ContributorCovenant](https://github.com/ContributorCovenant/contributor_covenant/tree/release/content/version/2/0)

Refer to the sections on reporting and escalation in this document for the specific emails that can be used to report and escalate issues.

## Reporting

### Project Spaces

For reporting issues in spaces related to a member project please use the email provided by the project for reporting. Projects handle CoC issues related to the spaces that they maintain. Projects maintainers commit to:

- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.

### Foundation Spaces

For reporting issues in spaces managed by the OpenJS Foundation, for example, repositories within the OpenJS organization, use the email `report@lists.openjsf.org`. The Cross Project Council (CPC) is responsible for managing these reports and commits to:

- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.

## Escalation

The OpenJS Foundation maintains a Code of Conduct Panel (CoCP). This is a foundation-wide team established to manage escalation when a reporter believes that a report to a member project or the CPC has not been properly handled. In order to escalate to the CoCP send an email to `coc-escalation@lists.openjsf.org`.

For more information, refer to the full
[Code of Conduct governance document](https://github.com/openjs-foundation/bootstrap/blob/master/proposals/stage-2/CODE_OF_CONDUCT/FOUNDATION_CODE_OF_CONDUCT_REQUIREMENTS.md).

---

## Contributor Covenant Code of Conduct v2.0

### Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

### Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

### Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

### Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at the email addresses listed above in the [Reporting](#reporting) and [Escalation](#escalation) sections. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

### Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

#### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

#### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

#### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

#### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the project community.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at [contributor-covenant.org/version/2/0/code_of_conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct).

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

For answers to common questions about this code of conduct, see the FAQ at
[contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
16 changes: 8 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -15,18 +15,18 @@ module.exports = function(grunt) {
}
},
eslint: {
gruntfile_tasks: ['Gruntfile.js', 'internal-tasks/*.js'],
libs_n_tests: ['lib/**/*.js', '<%= nodeunit.all %>'],
gruntfileTasks: ['Gruntfile.js', 'internal-tasks/*.js'],
libsAndTests: ['lib/**/*.js', '<%= nodeunit.all %>'],
subgrunt: ['<%= subgrunt.all %>']
},
watch: {
gruntfile_tasks: {
files: ['<%= eslint.gruntfile_tasks %>'],
tasks: ['eslint:gruntfile_tasks']
gruntfileTasks: {
files: ['<%= eslint.gruntfileTasks %>'],
tasks: ['eslint:gruntfileTasks']
},
libs_n_tests: {
files: ['<%= eslint.libs_n_tests %>'],
tasks: ['eslint:libs_n_tests', 'nodeunit']
libsAndTests: {
files: ['<%= eslint.libsAndTests %>'],
tasks: ['eslint:libsAndTests', 'nodeunit']
},
subgrunt: {
files: ['<%= subgrunt.all %>'],
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,21 +5,20 @@
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com/)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fgruntjs%2Fgrunt.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fgruntjs%2Fgrunt?ref=badge_shield)

<img align="right" height="260" src="http://gruntjs.com/img/grunt-logo-no-wordmark.svg">
<img align="right" height="260" src="https://gruntjs.com/img/grunt-logo-no-wordmark.svg">


### Documentation

Visit the [gruntjs.com](https://gruntjs.com/) website for all the things.

### Support / Contributing
Before you make an issue, please read our [Contributing](https://gruntjs.com/contributing) guide.

You can find the grunt team in [#grunt on irc.freenode.net](https://webchat.freenode.net/?channels=grunt).
Before you make an issue, please read our [Contributing](https://gruntjs.com/contributing) guide.

### Release History
See the [CHANGELOG](CHANGELOG).

### License

MIT
[MIT](LICENSE)
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Reporting a Vulnerability

If you discover a security vulnerability within grunt, please submit a report via [huntr.dev](https://huntr.dev/bounties/?target=https%3A%2F%2Fgithub.com%2Fgruntjs%2Fgrunt). Bounties and CVEs are automatically managed and allocated via the platform.

All security vulnerabilities will be promptly addressed.
29 changes: 0 additions & 29 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Visit the [gruntjs.com](http://gruntjs.com/) website for all the things.
Visit the [gruntjs.com](https://gruntjs.com/) website for all the things.
20 changes: 19 additions & 1 deletion lib/grunt.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,25 @@
var path = require('path');

// This allows grunt to require() .coffee files.
require('coffeescript/register');
try {
// Note: grunt no longer depends on CoffeeScript, it will only use it if it is intentionally
// installed in the project.
require('coffeescript/register');
} catch (e) {
// This is fine, and will cause no problems so long as the user doesn't load .coffee files.
// Print a useful error if we attempt to load a .coffee file.
if (require.extensions) {
var FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md'];
for (var i = 0; i < FILE_EXTENSIONS.length; i++) {
require.extensions[FILE_EXTENSIONS[i]] = function() {
throw new Error(
'Grunt attempted to load a .coffee file but CoffeeScript was not installed.\n' +
'Please run `npm install --dev coffeescript` to enable loading CoffeeScript.'
);
};
}
}
}

// The module to be exported.
var grunt = module.exports = {};
Loading