@tbela99/css-parser 1.6.8 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/index-umd-web.js +221 -244
- package/dist/index.cjs +220 -243
- package/dist/index.d.ts +8 -1
- package/dist/package.json.js +2 -2
- package/dist/src/data/properties.json.js +1 -1
- package/dist/src/data/validation.json.js +8 -2
- package/dist/src/lib/ast/clone.js +1 -1
- package/dist/src/lib/ast/expand.js +1 -1
- package/dist/src/lib/ast/features/calc.js +1 -1
- package/dist/src/lib/ast/features/if.js +1 -1
- package/dist/src/lib/ast/features/index.js +1 -1
- package/dist/src/lib/ast/features/inlinecssvariables.js +1 -1
- package/dist/src/lib/ast/features/prefix.js +1 -1
- package/dist/src/lib/ast/features/shorthand.js +39 -22
- package/dist/src/lib/ast/features/transform.js +1 -1
- package/dist/src/lib/ast/features/type.js +1 -1
- package/dist/src/lib/ast/find.js +1 -1
- package/dist/src/lib/ast/math/expression.js +1 -1
- package/dist/src/lib/ast/math/math.js +1 -1
- package/dist/src/lib/ast/minify.js +31 -3
- package/dist/src/lib/ast/node.js +1 -1
- package/dist/src/lib/ast/transform/compute.js +1 -1
- package/dist/src/lib/ast/transform/matrix.js +1 -1
- package/dist/src/lib/ast/transform/minify.js +1 -1
- package/dist/src/lib/ast/transform/perspective.js +1 -1
- package/dist/src/lib/ast/transform/rotate.js +1 -1
- package/dist/src/lib/ast/transform/scale.js +1 -1
- package/dist/src/lib/ast/transform/skew.js +1 -1
- package/dist/src/lib/ast/transform/translate.js +1 -1
- package/dist/src/lib/ast/transform/utils.js +1 -1
- package/dist/src/lib/ast/types.js +1 -1
- package/dist/src/lib/ast/walk.js +1 -1
- package/dist/src/lib/fs/resolve.js +1 -1
- package/dist/src/lib/parser/declaration/list.js +11 -1
- package/dist/src/lib/parser/declaration/map.js +2 -2
- package/dist/src/lib/parser/declaration/set.js +1 -1
- package/dist/src/lib/parser/linesmap.js +1 -1
- package/dist/src/lib/parser/parse.js +9 -18
- package/dist/src/lib/parser/source.js +1 -1
- package/dist/src/lib/parser/tokenize.js +1 -1
- package/dist/src/lib/parser/utils/angle.js +1 -1
- package/dist/src/lib/parser/utils/at-rule-container.js +1 -1
- package/dist/src/lib/parser/utils/at-rule-font-feature-values.js +1 -1
- package/dist/src/lib/parser/utils/at-rule-generic.js +1 -1
- package/dist/src/lib/parser/utils/at-rule-import.js +1 -1
- package/dist/src/lib/parser/utils/at-rule-media.js +2 -2
- package/dist/src/lib/parser/utils/at-rule-support.js +2 -2
- package/dist/src/lib/parser/utils/at-rule-when-else.js +1 -1
- package/dist/src/lib/parser/utils/at-rule.js +1 -1
- package/dist/src/lib/parser/utils/base64.js +1 -1
- package/dist/src/lib/parser/utils/cache.js +1 -1
- package/dist/src/lib/parser/utils/config.js +1 -1
- package/dist/src/lib/parser/utils/declaration.js +1 -1
- package/dist/src/lib/parser/utils/eq.js +1 -1
- package/dist/src/lib/parser/utils/hash.js +1 -1
- package/dist/src/lib/parser/utils/selector.js +1 -1
- package/dist/src/lib/parser/utils/text.js +1 -1
- package/dist/src/lib/parser/utils/token.js +2 -1
- package/dist/src/lib/parser/utils/type.js +1 -1
- package/dist/src/lib/printer/render.js +2 -2
- package/dist/src/lib/printer/sourcemap/lib/codec.js +1 -1
- package/dist/src/lib/printer/sourcemap/sourcemap.js +1 -1
- package/dist/src/lib/syntax/color/a98rgb.js +1 -1
- package/dist/src/lib/syntax/color/alpha.js +1 -1
- package/dist/src/lib/syntax/color/cmyk.js +1 -1
- package/dist/src/lib/syntax/color/color-mix.js +1 -1
- package/dist/src/lib/syntax/color/color.js +1 -1
- package/dist/src/lib/syntax/color/hex.js +1 -1
- package/dist/src/lib/syntax/color/hsl.js +1 -1
- package/dist/src/lib/syntax/color/hwb.js +1 -1
- package/dist/src/lib/syntax/color/lab.js +1 -1
- package/dist/src/lib/syntax/color/lch.js +1 -1
- package/dist/src/lib/syntax/color/oklab.js +1 -1
- package/dist/src/lib/syntax/color/oklch.js +1 -1
- package/dist/src/lib/syntax/color/p3.js +1 -1
- package/dist/src/lib/syntax/color/prophotorgb.js +1 -1
- package/dist/src/lib/syntax/color/rec2020.js +1 -1
- package/dist/src/lib/syntax/color/relative-color.js +1 -1
- package/dist/src/lib/syntax/color/rgb.js +1 -1
- package/dist/src/lib/syntax/color/srgb.js +1 -1
- package/dist/src/lib/syntax/color/utils/color-type.js +1 -1
- package/dist/src/lib/syntax/color/utils/colorspace.js +1 -1
- package/dist/src/lib/syntax/color/utils/components.js +1 -1
- package/dist/src/lib/syntax/color/utils/distance.js +1 -1
- package/dist/src/lib/syntax/color/utils/make-color.js +1 -1
- package/dist/src/lib/syntax/color/utils/matrix.js +1 -1
- package/dist/src/lib/syntax/color/xyz.js +1 -1
- package/dist/src/lib/syntax/color/xyzd50.js +1 -1
- package/dist/src/lib/syntax/constants.js +1 -1
- package/dist/src/lib/syntax/syntax.js +1 -1
- package/dist/src/lib/validation/config.js +20 -3
- package/dist/src/lib/validation/match.js +98 -196
- package/dist/src/lib/validation/parser/parse.js +8 -3
- package/dist/src/lib/validation/parser/typedef.js +1 -1
- package/dist/src/lib/validation/utils/list.js +1 -1
- package/dist/src/node.js +2 -1
- package/dist/src/types.js +1 -1
- package/dist/src/utils/sync.js +1 -1
- package/dist/src/web.js +2 -1
- package/package.json +7 -6
- package/CONTRIBUTING.md +0 -119
package/CONTRIBUTING.md
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
Thanks for your interest in contributing to CSS Parser. This guide explains how to get the project running locally, update its generated configuration data, run the checks, and submit a change. It is intended to help new contributors get started and make contributions easier to review.
|
|
4
|
-
|
|
5
|
-
## Get the source
|
|
6
|
-
|
|
7
|
-
1. Fork the repository on GitHub.
|
|
8
|
-
2. Clone your fork and enter the project directory:
|
|
9
|
-
|
|
10
|
-
```sh
|
|
11
|
-
git clone https://github.com/<your-user-name>/css-parser.git
|
|
12
|
-
cd css-parser
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
3. Add the upstream repository and install the root project dependencies:
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
git remote add upstream https://github.com/tbela99/css-parser.git
|
|
19
|
-
npm install
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
4. Create a branch for your change:
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
git switch -c descriptive-branch-name
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Use a current Node.js release compatible with the project dependencies.
|
|
29
|
-
|
|
30
|
-
## Update generated configuration
|
|
31
|
-
|
|
32
|
-
The repository includes scripts for refreshing generated CSS property and syntax data. Run them from the project root:
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm run config-update
|
|
36
|
-
npm run syntax-update
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
`config-update` regenerates `src/data/properties.json`. `syntax-update` regenerates `src/data/validation.json` from upstream CSS data and therefore requires an internet connection. Review the generated changes and include them when they are relevant to your contribution.
|
|
40
|
-
|
|
41
|
-
## Building
|
|
42
|
-
|
|
43
|
-
Run the build command:
|
|
44
|
-
|
|
45
|
-
```sh
|
|
46
|
-
npm run build
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Validate your changes before committing using deno:
|
|
50
|
-
|
|
51
|
-
```sh
|
|
52
|
-
deno publish --dry-run
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Run tests
|
|
56
|
-
|
|
57
|
-
Run the complete Node.js and browser test suites before submitting a change:
|
|
58
|
-
|
|
59
|
-
```sh
|
|
60
|
-
npm test
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
For a quicker, focused check, run either suite:
|
|
64
|
-
|
|
65
|
-
```sh
|
|
66
|
-
npm run test:node
|
|
67
|
-
npm run test:web
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
The browser tests use Playwright with Chromium, Firefox, and WebKit. Install the required browsers if Playwright reports that they are missing.
|
|
71
|
-
|
|
72
|
-
For debugging, run either suite:
|
|
73
|
-
|
|
74
|
-
```sh
|
|
75
|
-
npm run debug:node
|
|
76
|
-
npm run debug:web
|
|
77
|
-
```
|
|
78
|
-
## Check code coverage
|
|
79
|
-
|
|
80
|
-
Generate Node.js coverage reports with:
|
|
81
|
-
|
|
82
|
-
```sh
|
|
83
|
-
npm run test:cov
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
The command prints a text summary and writes an HTML report under `coverage/`. Browser coverage can be collected separately with:
|
|
87
|
-
|
|
88
|
-
```sh
|
|
89
|
-
npm run test:web-cov
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
When changing behavior, add or update tests that exercise it and use the coverage reports to spot untested paths.
|
|
93
|
-
|
|
94
|
-
## Run the benchmark
|
|
95
|
-
|
|
96
|
-
The benchmark has its own dependencies and must be run from the `benchmark/` directory:
|
|
97
|
-
|
|
98
|
-
```sh
|
|
99
|
-
cd benchmark
|
|
100
|
-
npm install
|
|
101
|
-
npm run all
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
This computes output sizes, runs the timing benchmarks, and generates `benchmark/results/benchmark.html`. Open that report to inspect the results. To run individual stages, use `npm run sizes`, `npm run bench`, or `npm run report` from `benchmark/`.
|
|
105
|
-
|
|
106
|
-
## Open a pull request
|
|
107
|
-
|
|
108
|
-
1. Review your changes and make sure no unrelated generated files or benchmark results are included.
|
|
109
|
-
2. Run the relevant tests; include coverage or benchmark results when they help explain the change.
|
|
110
|
-
3. Push your branch to your fork:
|
|
111
|
-
|
|
112
|
-
```sh
|
|
113
|
-
git push -u origin descriptive-branch-name
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
4. Open a pull request on GitHub against `tbela99/css-parser`'s `master` branch.
|
|
117
|
-
5. In the pull request description, explain the problem and the proposed change, link any related issue, and list the checks you ran. Include before-and-after benchmark results for performance-related changes.
|
|
118
|
-
|
|
119
|
-
Keep each pull request focused, and be ready to discuss or revise the change during review.
|