Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure sass fatalDeprecations and silenceDeprecations options #28587

Closed
sod opened this issue Oct 7, 2024 · 1 comment · Fixed by #28627
Closed

Allow to configure sass fatalDeprecations and silenceDeprecations options #28587

sod opened this issue Oct 7, 2024 · 1 comment · Fixed by #28627
Labels
angular/build:application area: @angular/build feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature

Comments

@sod
Copy link

sod commented Oct 7, 2024

Command

serve, build

Description

Please allow to configure fatalDeprecations and silenceDeprecations.

  • fatalDeprecations can be used to prevent already deprecated features or syntax be added to the code - by failing the build - in a code base where a lot of people are working on.
  • silenceDeprecations can be used, so you don't have to downgrade sass anymore.

Describe the solution you'd like

perhaps in the angular.json:

"stylePreprocessorOptions": {
    "fatalDeprecations": ["color-functions", "1.70.0"],
    "silenceDeprecations": ["1.77.0"],
}

Describe alternatives you've considered

No response

@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Oct 8, 2024
@dgp1130
Copy link
Collaborator

dgp1130 commented Oct 8, 2024

Agreed this would be useful for Sass users. We normally try to abstract over and encapsulate options like this, but it doesn't seem like we can provide a meaningful abstraction on top of these options and there's not much risk of misuse by users, since they can't really break your application outside of failing from deprecations as they are intended to.

We should probably also add futureDeprecations which is in the same boat as the two options discussed above.

We likely don't want to put these directly in stylePreprocessorOptions since that applies to all preprocessors (including Less) where these options don't do anything. The better design is likely to create a sass sub-object which contains these three deprecation options.

@dgp1130 dgp1130 added feature Issue that requests a new feature feature: under consideration Feature request for which voting has completed and the request is now under consideration area: @angular/build and removed needs: discussion On the agenda for team meeting to determine next steps labels Oct 8, 2024
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 14, 2024
… in application builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sassOptions": {
          "futureDeprecations": ["color-options"],
          "fatalDeprecations": ["color-options"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 14, 2024
… in application builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sassOptions": {
          "futureDeprecations": ["color-options"],
          "fatalDeprecations": ["color-options"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 14, 2024
… in application builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sassOptions": {
          "futureDeprecations": ["color-options"],
          "fatalDeprecations": ["color-options"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 14, 2024
… in application builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sassOptions": {
          "futureDeprecations": ["color-options"],
          "fatalDeprecations": ["color-options"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 14, 2024
… in application builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sassOptions": {
          "futureDeprecations": ["color-functions"],
          "fatalDeprecations": ["color-functions"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 14, 2024
… in application builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sassOptions": {
          "futureDeprecations": ["color-functions"],
          "fatalDeprecations": ["color-functions"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 16, 2024
…lication builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sass": {
          "futureDeprecations": ["color-functions"],
          "fatalDeprecations": ["color-functions"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Oct 16, 2024
…lication builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sass": {
          "futureDeprecations": ["color-functions"],
          "fatalDeprecations": ["color-functions"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes angular#28587
alan-agius4 added a commit that referenced this issue Oct 16, 2024
…lication builder

This commit introduces the functionality to configure a limited number of options for Sass processing in the Angular application builder. The following options have been added to enhance the Sass integration:

- **futureDeprecations**: Specifies features that are scheduled for deprecation. The compiler will treat these as active and emit warnings as necessary.
- **fatalDeprecations**: Identifies Sass features that are already deprecated and will cause build failures if used.
- **silenceDeprecations**: This option suppresses deprecation warnings for specified versions.

Usage example:
```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputHashing": "none",
      "namedChunks": true,
      "stylePreprocessorOptions": {
        "sass": {
          "futureDeprecations": ["color-functions"],
          "fatalDeprecations": ["color-functions"],
          "silenceDeprecations": ["1.77.0"]
        }
      }
    }
  }
}
```

For more information about these options, please refer to the  Sass documentation: https://sass-lang.com/documentation/js-api/interfaces/options/

Closes #28587
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular/build:application area: @angular/build feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
None yet
3 participants