Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Release version 4.0.2 and deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
valtlai committed Nov 3, 2023
1 parent 287ed0b commit e60f7ca
Show file tree
Hide file tree
Showing 14 changed files with 371 additions and 96 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ root = true
charset = utf-8
end_of_line = lf
indent_style = tab
trim_trailing_whitespace = true
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_style = space
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish npm package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install --global npm
- run: npm pkg delete scripts devDependencies
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.*
*.test.*
deno.json
biome.json
test.mjs
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# Changelog

This project uses [semantic versioning](https://semver.org/).

## [v4.0.2] (2023-11-03)

- This module is discontinued.
Please use [@csstools/postcss-font-format-keywords][csstools] instead.
- Removed the ESM exports.
All Node.js versions support CommonJS, so this should not matter.

## [4.0.1] (2022-11-03)

- Fixed readme

## [4.0.0] (2022-11-03)

- BREAKING: Removed the `singleQuote` option
- BREAKING: Dropped the support for Node.js 12 and 17
(so Node.js 14, 16, and 18 or greater are now supported)
Expand All @@ -12,24 +23,30 @@
- Changed the license from MIT to ISC

## [3.0.2] (2021-05-31)

- Updated readme

## [3.0.1] (2021-05-26)

- Fixed readme

## [3.0.0] (2021-05-26)

- BREAKING: Dropped the support for Node.js 10 and 15
(so Node.js 12, 14, and 16 or greater are now supported)
- Added an ESM version for Node.js
- Added support for Deno 🦕

## [2.0.2] (2020-10-23)

- Fixed the `postcss` peer dependency version to be `^8.0.0`

## [2.0.1] (2020-09-22)

- Removed the development fields from `package.json` before publishing

## [2.0.0] (2020-09-17)

- BREAKING: Moved to PostCSS 8
- BREAKING: Removed the support for non-lowercase identifiers
- BREAKING: Made `postcss` a peer dependency
Expand All @@ -39,22 +56,28 @@
- Updated the dependencies

## [1.0.3] (2020-05-25)

- Updated the changelog format
- Updated the ESLint config
- Removed the `package-lock`

## [1.0.2] (2019-12-10)

- Refactored code
- Meta: renamed the changelog file
- Meta: clarified the previous changelog item

## [1.0.1] (2019-12-09)

- Meta: added the license badge
- Meta: added more package keywords

## [1.0.0] (2019-12-09)

- Initial release

[csstools]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords#readme
[v4.0.2]: https://github.com/valtlai/postcss-font-format-keywords/compare/4.0.1...v4.0.2
[4.0.1]: https://github.com/valtlai/postcss-font-format-keywords/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/valtlai/postcss-font-format-keywords/compare/3.0.2...4.0.0
[3.0.2]: https://github.com/valtlai/postcss-font-format-keywords/compare/3.0.1...3.0.2
Expand All @@ -66,4 +89,4 @@
[1.0.3]: https://github.com/valtlai/postcss-font-format-keywords/compare/1.0.2...1.0.3
[1.0.2]: https://github.com/valtlai/postcss-font-format-keywords/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/valtlai/postcss-font-format-keywords/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/valtlai/postcss-font-format-keywords/releases/tag/1.0.0
[1.0.0]: https://github.com/valtlai/postcss-font-format-keywords/tree/1.0.0
15 changes: 0 additions & 15 deletions LICENSE

This file was deleted.

15 changes: 15 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ISC License

Copyright © 2019 Valtteri Laitinen

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 changes: 13 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# PostCSS Font Format Keywords [<img src="https://api.postcss.org/logo.svg" alt="PostCSS" width="90" height="90" align="right">](https://github.com/postcss/postcss)

[![deno.land](https://deno.land/badge/postcss_font_format_keywords/version)](https://deno.land/x/postcss_font_format_keywords)
[![NPM](https://img.shields.io/npm/v/postcss-font-format-keywords.svg)](https://www.npmjs.com/package/postcss-font-format-keywords)
[![License](https://img.shields.io/npm/l/postcss-font-format-keywords.svg)](LICENSE)

This PostCSS plugin lets you specify font formats as keywords, following the
[CSS Fonts](https://drafts.csswg.org/css-fonts-4/#font-format-values)
Expand All @@ -20,28 +18,25 @@ specification.
}
```

## Usage

### Deno
> [!IMPORTANT]
> ## ❌ Deprecated
>
> This module is deprecated and will not receive any updates anymore.
> Please use
> [@csstools/postcss-font-format-keywords](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords#readme)
> instead.
>
> ```
> npm install @csstools/postcss-font-format-keywords
> ```
Import the module:
## Install
```js
import postcss from 'npm:postcss';
import formatKeywords from 'https://deno.land/x/postcss_font_format_keywords@4.0.1/mod.js';

await postcss([formatKeywords]).process(YOUR_CSS);
```

### Node.js

Add the package in your project:

```sh
npm install postcss-font-format-keywords
```
Then import or require it:
## Usage
```js
import postcss from 'postcss';
Expand Down
18 changes: 18 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"linter": {
"rules": {
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
},
"suspicious": {
"noRedundantUseStrict": "off"
}
}
}
}
12 changes: 0 additions & 12 deletions deno.json

This file was deleted.

11 changes: 6 additions & 5 deletions mod.js → index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// node(postcss-value-parser)
import valueParser from 'https://deno.land/x/postcss_value_parser@4.2.0/mod.js';
'use strict';

const valueParser = require('postcss-value-parser');

const keywords = [
'woff',
Expand All @@ -26,7 +27,7 @@ function postcssFontFormatKeywords({ preserve = false } = {}) {
val.walk((node) => {
if (node.type !== 'function' || node.value !== 'format') return;

node.nodes.forEach((child) => {
for (const child of node.nodes) {
if (child.type !== 'word' || !keywords.includes(child.value)) {
return;
}
Expand All @@ -36,7 +37,7 @@ function postcssFontFormatKeywords({ preserve = false } = {}) {
value: child.value,
quote: '"',
});
});
}
});

if (preserve) {
Expand All @@ -52,4 +53,4 @@ function postcssFontFormatKeywords({ preserve = false } = {}) {

postcssFontFormatKeywords.postcss = true;

export default postcssFontFormatKeywords;
module.exports = postcssFontFormatKeywords;
Loading

0 comments on commit e60f7ca

Please sign in to comment.