pax_global_header00006660000000000000000000000064152375732210014521gustar00rootroot0000000000000052 comment=e452b5c3650093c06e3023b7122c9133c4eeaa88 postcss-postcss-parser-tests-4dac536/000077500000000000000000000000001523757322100177605ustar00rootroot00000000000000postcss-postcss-parser-tests-4dac536/.devcontainer.json000066400000000000000000000000601523757322100234060ustar00rootroot00000000000000{ "image": "ghcr.io/ai/devcontainer:latest" } postcss-postcss-parser-tests-4dac536/.editorconfig000066400000000000000000000002231523757322100224320ustar00rootroot00000000000000root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true postcss-postcss-parser-tests-4dac536/.github/000077500000000000000000000000001523757322100213205ustar00rootroot00000000000000postcss-postcss-parser-tests-4dac536/.github/FUNDING.yml000066400000000000000000000000441523757322100231330ustar00rootroot00000000000000open_collective: postcss github: ai postcss-postcss-parser-tests-4dac536/.github/workflows/000077500000000000000000000000001523757322100233555ustar00rootroot00000000000000postcss-postcss-parser-tests-4dac536/.github/workflows/release.yml000066400000000000000000000023451523757322100255240ustar00rootroot00000000000000name: Release on: push: tags: - '*' jobs: publish: runs-on: ubuntu-latest permissions: contents: read id-token: write steps: - name: Checkout the repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Clean npm package uses: ai/clean-npm-project@3f664d1a83e04a2be737b7ad4e0b5a4e1b7dbc08 # v0.3.1 with: clean-docs: true - name: Install Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 26 package-manager-cache: false - name: Publish npm package run: npm stage publish working-directory: cleaned-project/ release: runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout the repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Copy CHANGELOG.md to Releases uses: ai/copy-changelog-to-release@a6dc825c34575add2da2060796794f7b84894628 # v0.2.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} postcss-postcss-parser-tests-4dac536/.github/workflows/test.yml000066400000000000000000000011431523757322100250560ustar00rootroot00000000000000name: Test on: push: branches: - main pull_request: permissions: contents: read jobs: test: name: Test runs-on: ubuntu-latest steps: - name: Checkout the repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Node.js & pnpm uses: pnpm/setup@c9883cc79df532ad1a7b81bf9ab944ceb090d65c # v2.0.0 with: version: 11 runtime: node@26 - name: Install dependencies run: pnpm ci - name: Run tests run: pnpm test postcss-postcss-parser-tests-4dac536/.gitignore000066400000000000000000000000161523757322100217450ustar00rootroot00000000000000node_modules/ postcss-postcss-parser-tests-4dac536/.npmignore000066400000000000000000000000351523757322100217550ustar00rootroot00000000000000test/ .github/ tsconfig.json postcss-postcss-parser-tests-4dac536/CHANGELOG.md000066400000000000000000000055231523757322100215760ustar00rootroot00000000000000# Change Log This project uses major version number for PostCSS, minor for adding/removing tests, and patch for fixes. ## 8.10.0 - Updated `offset` according to fix in `postcss` (by @maximilliangrand). ## 8.9.0 - Added more rules with semicolon cases (by @romainmenke). ## 8.8 - Update `offset` according to fix in `postcss` (by Ido Rosenthal). ## 8.7 - Moved `jsonify()` from `string` to `object`. - Moved `eachTest()`from `string` to `object` in `json` argument. - Added `source.end` for `Root` (by Romain Menke). ## 8.6 - Removed Habr.com real tests because of often 404 error. ## 8.5.2 - Fixed ESM support. ## 8.5.1 - Fixed empty Custom Properties position. ## 8.5 - Added safe example for comment removal. ## 8.4 - Added more CSS Custom Properties tests. - Added more dangerous comments tests. - Reduced dependencies. ## 8.3.7 - Replaced `nanocolors` with `picocolors`. - Removed `ci-job-number`. ## 8.3.6 - Replaced `coloretter` with `nanocolors`. ## 8.3.5 - Removed `Nodeinputs` and `Node#source.inputId` (by Niklas Mischkulnig). ## 8.3.4 - Removed `Node#source.input` from test cases. ## 8.3.3 - Reverted Node.js 15 warning fix. ## 8.3.2 - Fixed Node.js 15 warning. ## 8.3.1 - Added funding links. ## 8.3 - Added `Node#source.offset` to test cases. ## 8.2 - Added empty Custom Properties case with comments and `!important`. ## 8.1 - Added empty Custom Properties case. ## 8.0 - Added Custom Properties with `{}` case for PostCSS 8. - Added at-rule with `{}` in params case for PostCSS 8. - Added ESM support. - Added TypeScript types. - Replace `chalk` to `colorette`. ## 6.5 - Parse `--a: {}` as `--a` declaration with `{}` value. ## 6.4 - Add more cases for Custom Properties (by Ivan Solovev). ## 6.3.1 - Fix compatibility with PostCSS 7.0.6. ## 6.3 - Add case with nested at-rule without semicolon, params, and spaces. ## 6.2.1 - Remove `gulp-util`. ## 6.2 - Add case with comment between word tokens (by Oleh Kuchuk). ## 6.1 - Add `!IMPORTANT` case. ## 6.0.2 - Fix `end` position in at-rule test (by Oleh Kuchuk). ## 6.0.1 - Add `\62 olor: red` case. ## 6.0 - Add rule with semicolon case for PostCSS 6.0. ## 5.0.11 - Add `/**/!important` case. - Clean up npm package from unnecessary files. ## 5.0.10 - Add `[attr=;]` case. ## 5.0.9 - Remove `node.id` removing. ## 5.0.8 - Remove unique `node.id` too (by Ivan Serniaev). ## 5.0.7 - Add test for correct `between`. ## 5.0.6 - Remove cache properties from node in `jsonify`. ## 5.0.5 - Add more tests for `!important`. ## 5.0.4 - Add value trimming test. - Add nested at-rule without semicolon test. ## 5.0.3 - Add multi-tokens property test. ## 5.0.2 - Fix `Root` start source. ## 5.0.1 - Better test with `url()`. - Add tests with empty files. - Add test with BOM symbol. - Add start source to `Root`. ## 5.0 - Initial release from PostCSS sources. postcss-postcss-parser-tests-4dac536/LICENSE000066400000000000000000000021071523757322100207650ustar00rootroot00000000000000The MIT License (MIT) Copyright 2013 Andrey Sitnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. postcss-postcss-parser-tests-4dac536/README.md000066400000000000000000000031301523757322100212340ustar00rootroot00000000000000# PostCSS Parser Tests This project contains base tests for every [PostCSS] CSS parser, including: - 24 CSS files to test extreme cases of the CSS specification. - Integration tests by popular website styles to test CSS from the wild. These tests are useful for any CSS parser, not just parsers within the PostCSS ecosystem. [PostCSS]: https://github.com/postcss/postcss ## Cases You can iterate through all test cases using the `cases.each` method: ```js const cases = require('postcss-parser-tests') cases.each((name, css, ideal) => { it('parses ' + name, () => { const root = parse(css, { from: name }) const json = cases.jsonify(root) expect(json).toEquql(ideal) }) }) ``` This returns the case name, CSS string, and PostCSS AST JSON. If you create a non-PostCSS parser, just compare if the input CSS is equal to the output CSS after parsing. You can also get the path to some specific test cases using the `cases.path(name)` method. ## Integration Integration tests are packed into a Gulp task: ```js const cases = require('postcss-parser-tests') cases.real(css => { return parser(css).toResult({ map: { annotation: false } }) }) ``` Your callback must parse CSS and stringify it back. The plugin will then compare the input and output CSS. You can add extra sites using an optional third argument: ```js cases.real( css => { return parser(css).toResult({ map: { annotation: false } }) }, ['http://browserhacks.com/'] ) ``` postcss-postcss-parser-tests-4dac536/cases/000077500000000000000000000000001523757322100210565ustar00rootroot00000000000000postcss-postcss-parser-tests-4dac536/cases/apply.css000066400000000000000000000001721523757322100227150ustar00rootroot00000000000000:root { --zero-size: { width: 0; height: 0; }; --small-icon: { width: 16px; height: 16px; } ; } postcss-postcss-parser-tests-4dac536/cases/apply.json000066400000000000000000000032401523757322100230750ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 4, "line": 5, "offset": 58 }, "start": { "column": 3, "line": 2, "offset": 10 } }, "prop": "--zero-size", "value": "{\n width: 0;\n height: 0;\n }" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 3, "line": 10, "offset": 119 }, "start": { "column": 3, "line": 6, "offset": 61 } }, "prop": "--small-icon", "value": "{\n width: 16px;\n height: 16px;\n }\n " } ], "source": { "end": { "column": 1, "line": 11, "offset": 121 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": ":root" } ], "source": { "end": { "column": 2, "line": 11, "offset": 121 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/at-rule-brackets.css000066400000000000000000000007741523757322100247450ustar00rootroot00000000000000@supports (--element(".minwidth", { "minWidth": 300 })) { [--self] { background: greenyellow; } } @supports ({"example": 1}) { * { background: red; } } @supports (("example": 1)) { * { background: red; } } @supports (func("example": 1)) { * { background: red; } } @supports (--var) { * { background: red; } } @supports ([]) { * { background: red; } } @supports ([color: red]) { * { background: red; } } @supports ([[[[[{ --func(color: { red }) }]]]]]) { * { background: red; } } postcss-postcss-parser-tests-4dac536/cases/at-rule-brackets.json000066400000000000000000000310551523757322100251220ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 5, "offset": 105 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": "(--element(\".minwidth\", { \"minWidth\": 300 }))", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": "\n " }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 28, "line": 3, "offset": 99 }, "start": { "column": 5, "line": 3, "offset": 75 } }, "prop": "background", "value": "greenyellow" } ], "source": { "end": { "column": 3, "line": 4, "offset": 103 }, "start": { "column": 3, "line": 2, "offset": 60 } }, "selector": "[--self]" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 9, "offset": 162 }, "start": { "column": 1, "line": 7, "offset": 107 } }, "params": "({\"example\": 1})", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 8, "offset": 158 }, "start": { "column": 7, "line": 8, "offset": 142 } }, "prop": "background", "value": "red" } ], "source": { "end": { "column": 24, "line": 8, "offset": 160 }, "start": { "column": 3, "line": 8, "offset": 138 } }, "selector": "*" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 13, "offset": 219 }, "start": { "column": 1, "line": 11, "offset": 164 } }, "params": "((\"example\": 1))", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 12, "offset": 215 }, "start": { "column": 7, "line": 12, "offset": 199 } }, "prop": "background", "value": "red" } ], "source": { "end": { "column": 24, "line": 12, "offset": 217 }, "start": { "column": 3, "line": 12, "offset": 195 } }, "selector": "*" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 17, "offset": 280 }, "start": { "column": 1, "line": 15, "offset": 221 } }, "params": "(func(\"example\": 1))", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 16, "offset": 276 }, "start": { "column": 7, "line": 16, "offset": 260 } }, "prop": "background", "value": "red" } ], "source": { "end": { "column": 24, "line": 16, "offset": 278 }, "start": { "column": 3, "line": 16, "offset": 256 } }, "selector": "*" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 21, "offset": 328 }, "start": { "column": 1, "line": 19, "offset": 282 } }, "params": "(--var)", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 20, "offset": 324 }, "start": { "column": 7, "line": 20, "offset": 308 } }, "prop": "background", "value": "red" } ], "source": { "end": { "column": 24, "line": 20, "offset": 326 }, "start": { "column": 3, "line": 20, "offset": 304 } }, "selector": "*" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 25, "offset": 373 }, "start": { "column": 1, "line": 23, "offset": 330 } }, "params": "([])", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 24, "offset": 369 }, "start": { "column": 7, "line": 24, "offset": 353 } }, "prop": "background", "value": "red" } ], "source": { "end": { "column": 24, "line": 24, "offset": 371 }, "start": { "column": 3, "line": 24, "offset": 349 } }, "selector": "*" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 29, "offset": 428 }, "start": { "column": 1, "line": 27, "offset": 375 } }, "params": "([color: red])", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 28, "offset": 424 }, "start": { "column": 7, "line": 28, "offset": 408 } }, "prop": "background", "value": "red" } ], "source": { "end": { "column": 24, "line": 28, "offset": 426 }, "start": { "column": 3, "line": 28, "offset": 404 } }, "selector": "*" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 33, "offset": 507 }, "start": { "column": 1, "line": 31, "offset": 430 } }, "params": "([[[[[{ --func(color: { red }) }]]]]])", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 32, "offset": 503 }, "start": { "column": 7, "line": 32, "offset": 487 } }, "prop": "background", "value": "red" } ], "source": { "end": { "column": 24, "line": 32, "offset": 505 }, "start": { "column": 3, "line": 32, "offset": 483 } }, "selector": "*" } ] } ], "source": { "end": { "column": 2, "line": 33, "offset": 507 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/atrule-decls.css000066400000000000000000000003111523757322100241470ustar00rootroot00000000000000@page :left { background: black } @media(min-width: 0) { background: white } @font-face { family-name: "A;' /**/"; } @viewport { width: 110px; } @-ms-viewport { width: 100px; } postcss-postcss-parser-tests-4dac536/cases/atrule-decls.json000066400000000000000000000116111523757322100243350ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "page", "source": { "end": { "column": 1, "line": 3, "offset": 37 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": ":left", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 21, "line": 2, "offset": 35 }, "start": { "column": 5, "line": 2, "offset": 18 } }, "prop": "background", "value": "black" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": "", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "media", "source": { "end": { "column": 1, "line": 7, "offset": 85 }, "start": { "column": 1, "line": 5, "offset": 39 } }, "params": "(min-width: 0)", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 21, "line": 6, "offset": 83 }, "start": { "column": 5, "line": 6, "offset": 66 } }, "prop": "background", "value": "white" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": "", "semicolon": true, "after": "\n" }, "type": "atrule", "name": "font-face", "source": { "end": { "column": 1, "line": 11, "offset": 130 }, "start": { "column": 1, "line": 9, "offset": 87 } }, "params": "", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 28, "line": 10, "offset": 128 }, "start": { "column": 5, "line": 10, "offset": 104 } }, "prop": "family-name", "value": "\"A;' /**/\"" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": "", "semicolon": true, "after": "\n" }, "type": "atrule", "name": "viewport", "source": { "end": { "column": 1, "line": 15, "offset": 163 }, "start": { "column": 1, "line": 13, "offset": 132 } }, "params": "", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 14, "offset": 161 }, "start": { "column": 5, "line": 14, "offset": 148 } }, "prop": "width", "value": "110px" } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": "", "semicolon": true, "after": "\n" }, "type": "atrule", "name": "-ms-viewport", "source": { "end": { "column": 1, "line": 19, "offset": 200 }, "start": { "column": 1, "line": 17, "offset": 165 } }, "params": "", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 18, "offset": 198 }, "start": { "column": 5, "line": 18, "offset": 185 } }, "prop": "width", "value": "100px" } ] } ], "source": { "end": { "column": 2, "line": 19, "offset": 200 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/atrule-empty.css000066400000000000000000000000221523757322100242120ustar00rootroot00000000000000@charset "UTF-8"; postcss-postcss-parser-tests-4dac536/cases/atrule-empty.json000066400000000000000000000012331523757322100244000ustar00rootroot00000000000000{ "raws": { "semicolon": true, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": "", "afterName": " " }, "type": "atrule", "name": "charset", "source": { "end": { "column": 17, "line": 1, "offset": 17 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": "\"UTF-8\"" } ], "source": { "end": { "column": 18, "line": 1, "offset": 17 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/atrule-no-params.css000066400000000000000000000000111523757322100247470ustar00rootroot00000000000000@page{ } postcss-postcss-parser-tests-4dac536/cases/atrule-no-params.json000066400000000000000000000012641523757322100251430ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": "", "afterName": "", "after": " " }, "type": "atrule", "name": "page", "source": { "end": { "column": 8, "line": 1, "offset": 8 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": "", "nodes": [] } ], "source": { "end": { "column": 9, "line": 1, "offset": 8 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/atrule-no-semicolon.css000066400000000000000000000000531523757322100254620ustar00rootroot00000000000000@media screen {@content} @charset "UTF-8" postcss-postcss-parser-tests-4dac536/cases/atrule-no-semicolon.json000066400000000000000000000027511523757322100256520ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "afterName": " ", "semicolon": false, "after": "" }, "type": "atrule", "name": "media", "source": { "end": { "column": 24, "line": 1, "offset": 24 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": "screen", "nodes": [ { "raws": { "before": "", "between": "", "afterName": "" }, "type": "atrule", "name": "content", "source": { "start": { "column": 16, "line": 1, "offset": 15 } }, "params": "" } ] }, { "raws": { "before": "\n\n", "between": "", "afterName": " " }, "type": "atrule", "name": "charset", "source": { "end": { "column": 16, "line": 3, "offset": 42 }, "start": { "column": 1, "line": 3, "offset": 26 } }, "params": "\"UTF-8\"" } ], "source": { "end": { "column": 17, "line": 3, "offset": 42 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/atrule-no-space.css000066400000000000000000000000221523757322100245610ustar00rootroot00000000000000@import"test.css" postcss-postcss-parser-tests-4dac536/cases/atrule-no-space.json000066400000000000000000000012351523757322100247510ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": "", "afterName": "" }, "type": "atrule", "name": "import", "source": { "end": { "column": 17, "line": 1, "offset": 17 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": "\"test.css\"" } ], "source": { "end": { "column": 18, "line": 1, "offset": 17 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/atrule-params.css000066400000000000000000000001061523757322100243420ustar00rootroot00000000000000@-moz-document/* near */ /* filter */ url("example.com/{") /* a */ {} postcss-postcss-parser-tests-4dac536/cases/atrule-params.json000066400000000000000000000013671523757322100245350ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " /* a */ ", "afterName": "/* near */ /* filter */ ", "after": "" }, "type": "atrule", "name": "-moz-document", "source": { "end": { "column": 69, "line": 1, "offset": 69 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": "url(\"example.com/{\")", "nodes": [] } ], "source": { "end": { "column": 70, "line": 1, "offset": 69 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/atrule-rules.css000066400000000000000000000004021523757322100242100ustar00rootroot00000000000000@supports (animation-name: test) { @-custom-keyframe anim { from { color: black; } to { color: white } } } @support selector(:focus-visible) { a:focus-visible { background: yellow; } } postcss-postcss-parser-tests-4dac536/cases/atrule-rules.json000066400000000000000000000126011523757322100243750ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "supports", "source": { "end": { "column": 1, "line": 10, "offset": 170 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "params": "(animation-name: test)", "nodes": [ { "raws": { "before": "\n ", "between": " ", "afterName": " ", "semicolon": false, "after": "\n " }, "type": "atrule", "name": "-custom-keyframe", "source": { "end": { "column": 5, "line": 9, "offset": 168 }, "start": { "column": 5, "line": 2, "offset": 39 } }, "params": "anim", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": "\n " }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 25, "line": 4, "offset": 104 }, "start": { "column": 13, "line": 4, "offset": 91 } }, "prop": "color", "value": "black" } ], "source": { "end": { "column": 9, "line": 5, "offset": 114 }, "start": { "column": 9, "line": 3, "offset": 72 } }, "selector": "from" }, { "raws": { "before": "\n ", "between": " ", "semicolon": false, "after": "\n " }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 24, "line": 7, "offset": 152 }, "start": { "column": 13, "line": 7, "offset": 140 } }, "prop": "color", "value": "white" } ], "source": { "end": { "column": 9, "line": 8, "offset": 162 }, "start": { "column": 9, "line": 6, "offset": 123 } }, "selector": "to" } ] } ] }, { "raws": { "before": "\n\n", "between": " ", "afterName": " ", "semicolon": false, "after": "\n" }, "type": "atrule", "name": "support", "source": { "end": { "column": 1, "line": 16, "offset": 257 }, "start": { "column": 1, "line": 12, "offset": 172 } }, "params": "selector(:focus-visible)", "nodes": [ { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": "\n " }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 23, "line": 14, "offset": 251 }, "start": { "column": 5, "line": 14, "offset": 232 } }, "prop": "background", "value": "yellow" } ], "source": { "end": { "column": 3, "line": 15, "offset": 255 }, "start": { "column": 3, "line": 13, "offset": 210 } }, "selector": "a:focus-visible" } ] } ], "source": { "end": { "column": 2, "line": 16, "offset": 257 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/between.css000066400000000000000000000000111523757322100232110ustar00rootroot00000000000000a/**/ {} postcss-postcss-parser-tests-4dac536/cases/between.json000066400000000000000000000012131523757322100233770ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": "/**/\n", "after": "" }, "type": "rule", "nodes": [], "source": { "end": { "column": 2, "line": 2, "offset": 8 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 3, "line": 2, "offset": 8 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/bom.json000066400000000000000000000012051523757322100225240ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": "", "after": "" }, "type": "rule", "nodes": [], "source": { "end": { "column": 3, "line": 1, "offset": 3 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 4, "line": 1, "offset": 3 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/colon-selector.css000066400000000000000000000000171523757322100245160ustar00rootroot00000000000000:fullscreen {} postcss-postcss-parser-tests-4dac536/cases/colon-selector.json000066400000000000000000000012241523757322100247000ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "after": "" }, "type": "rule", "nodes": [], "source": { "end": { "column": 14, "line": 1, "offset": 14 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": ":fullscreen" } ], "source": { "end": { "column": 15, "line": 1, "offset": 14 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/comments.css000066400000000000000000000004131523757322100234130ustar00rootroot00000000000000/* a { color: black } */ /**/ /* */ div { /* inside */ color: black; /* between */ border-radius: 3px / 7px /* end */ } /* b */ a { color: black; /* c */ } .in/**/side { color: var/**/(--broken); font-family: sans-serif,/**/serif; } postcss-postcss-parser-tests-4dac536/cases/comments.json000066400000000000000000000162641523757322100236070ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "left": " ", "right": " " }, "type": "comment", "source": { "end": { "column": 24, "line": 1, "offset": 24 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "text": "a { color: black }" }, { "raws": { "before": "\n", "left": "", "right": "" }, "type": "comment", "source": { "end": { "column": 4, "line": 2, "offset": 29 }, "start": { "column": 1, "line": 2, "offset": 25 } }, "text": "" }, { "raws": { "before": "\n", "left": " ", "right": "" }, "type": "comment", "source": { "end": { "column": 5, "line": 3, "offset": 35 }, "start": { "column": 1, "line": 3, "offset": 30 } }, "text": "" }, { "raws": { "before": "\n", "between": " ", "semicolon": false, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "left": " ", "right": " " }, "type": "comment", "source": { "end": { "column": 16, "line": 5, "offset": 58 }, "start": { "column": 5, "line": 5, "offset": 46 } }, "text": "inside" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 6, "offset": 76 }, "start": { "column": 5, "line": 6, "offset": 63 } }, "prop": "color", "value": "black" }, { "raws": { "before": "\n ", "left": " ", "right": " " }, "type": "comment", "source": { "end": { "column": 17, "line": 7, "offset": 94 }, "start": { "column": 5, "line": 7, "offset": 81 } }, "text": "between" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 28, "line": 8, "offset": 123 }, "start": { "column": 5, "line": 8, "offset": 99 } }, "prop": "border-radius", "value": "3px / 7px" }, { "raws": { "before": "\n ", "left": " ", "right": " " }, "type": "comment", "source": { "end": { "column": 13, "line": 9, "offset": 137 }, "start": { "column": 5, "line": 9, "offset": 128 } }, "text": "end" } ], "source": { "end": { "column": 1, "line": 10, "offset": 139 }, "start": { "column": 1, "line": 4, "offset": 36 } }, "selector": "div" }, { "raws": { "before": "\n", "left": " ", "right": " " }, "type": "comment", "source": { "end": { "column": 7, "line": 11, "offset": 147 }, "start": { "column": 1, "line": 11, "offset": 140 } }, "text": "b" }, { "raws": { "before": "\n\n", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 14, "offset": 170 }, "start": { "column": 5, "line": 14, "offset": 157 } }, "prop": "color", "value": "black" }, { "raws": { "before": "\n ", "left": " ", "right": " " }, "type": "comment", "source": { "end": { "column": 11, "line": 15, "offset": 182 }, "start": { "column": 5, "line": 15, "offset": 175 } }, "text": "c" } ], "source": { "end": { "column": 1, "line": 16, "offset": 184 }, "start": { "column": 1, "line": 13, "offset": 149 } }, "selector": "a" }, { "raws": { "before": "\n\n", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 27, "line": 19, "offset": 227 }, "start": { "column": 3, "line": 19, "offset": 202 } }, "prop": "color", "value": "var/**/(--broken)" }, { "raws": { "before": "\n ", "between": ": ", "value": { "raw": "sans-serif,/**/serif", "value": "sans-serif,serif" } }, "type": "decl", "source": { "end": { "column": 36, "line": 20, "offset": 264 }, "start": { "column": 3, "line": 20, "offset": 230 } }, "prop": "font-family", "value": "sans-serif,serif" } ], "source": { "end": { "column": 1, "line": 21, "offset": 266 }, "start": { "column": 1, "line": 18, "offset": 186 } }, "selector": ".in/**/side" } ], "source": { "end": { "column": 2, "line": 21, "offset": 266 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/custom-properties.css000066400000000000000000000010401523757322100252670ustar00rootroot00000000000000:root { --number: 1; --unit: 100vw; --color: #06c; --function: calc(1 + 1); --variable: var(--unit); --string: 'single quoted string'; --string: "double quoted string"; --square-block: [1, 2, 3]; --round-block: (1, 2, 3); --empty1: ; --empty2: /**/; --empty3: !important; --empty4:/**/ !important; --empty5:/**/ ; --bracket-block: {1, 2, 3}; --JSON: [1, "2", {"three": {"a":1}}, [4]]; --javascript: function(rule) { console.log(rule) }; } :root{--a:1} .semicolon-less {--empty-end:/**/ } .empty{--a: } postcss-postcss-parser-tests-4dac536/cases/custom-properties.json000066400000000000000000000272011523757322100254570ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 14, "line": 2, "offset": 22 }, "start": { "column": 3, "line": 2, "offset": 10 } }, "prop": "--number", "value": "1" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 16, "line": 3, "offset": 39 }, "start": { "column": 3, "line": 3, "offset": 25 } }, "prop": "--unit", "value": "100vw" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 16, "line": 4, "offset": 56 }, "start": { "column": 3, "line": 4, "offset": 42 } }, "prop": "--color", "value": "#06c" }, { "raws": { "before": "\n\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 26, "line": 6, "offset": 84 }, "start": { "column": 3, "line": 6, "offset": 60 } }, "prop": "--function", "value": "calc(1 + 1)" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 26, "line": 7, "offset": 111 }, "start": { "column": 3, "line": 7, "offset": 87 } }, "prop": "--variable", "value": "var(--unit)" }, { "raws": { "before": "\n\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 35, "line": 9, "offset": 148 }, "start": { "column": 3, "line": 9, "offset": 115 } }, "prop": "--string", "value": "'single quoted string'" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 35, "line": 10, "offset": 184 }, "start": { "column": 3, "line": 10, "offset": 151 } }, "prop": "--string", "value": "\"double quoted string\"" }, { "raws": { "before": "\n\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 28, "line": 12, "offset": 214 }, "start": { "column": 3, "line": 12, "offset": 188 } }, "prop": "--square-block", "value": "[1, 2, 3]" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 27, "line": 13, "offset": 242 }, "start": { "column": 3, "line": 13, "offset": 217 } }, "prop": "--round-block", "value": "(1, 2, 3)" }, { "raws": { "before": "\n\n ", "between": ":" }, "type": "decl", "source": { "end": { "column": 13, "line": 15, "offset": 257 }, "start": { "column": 3, "line": 15, "offset": 246 } }, "prop": "--empty1", "value": " " }, { "raws": { "before": "\n ", "between": ":", "value": { "raw": " /**/", "value": " " } }, "type": "decl", "source": { "end": { "column": 17, "line": 16, "offset": 275 }, "start": { "column": 3, "line": 16, "offset": 260 } }, "prop": "--empty2", "value": " " }, { "raws": { "before": "\n ", "between": ":", "important": "!important" }, "type": "decl", "source": { "end": { "column": 23, "line": 17, "offset": 299 }, "start": { "column": 3, "line": 17, "offset": 278 } }, "prop": "--empty3", "important": true, "value": " " }, { "raws": { "before": "\n ", "between": ":", "important": "!important", "value": { "raw": "/**/ ", "value": " " } }, "type": "decl", "source": { "end": { "column": 27, "line": 18, "offset": 327 }, "start": { "column": 3, "line": 18, "offset": 302 } }, "prop": "--empty4", "important": true, "value": " " }, { "raws": { "before": "\n ", "between": ":", "value": { "raw": "/**/ ", "value": " " } }, "type": "decl", "source": { "end": { "column": 17, "line": 19, "offset": 345 }, "start": { "column": 3, "line": 19, "offset": 330 } }, "prop": "--empty5", "value": " " }, { "raws": { "before": "\n\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 29, "line": 21, "offset": 376 }, "start": { "column": 3, "line": 21, "offset": 349 } }, "prop": "--bracket-block", "value": "{1, 2, 3}" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 44, "line": 22, "offset": 421 }, "start": { "column": 3, "line": 22, "offset": 379 } }, "prop": "--JSON", "value": "[1, \"2\", {\"three\": {\"a\":1}}, [4]]" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 53, "line": 23, "offset": 475 }, "start": { "column": 3, "line": 23, "offset": 424 } }, "prop": "--javascript", "value": "function(rule) { console.log(rule) }" } ], "source": { "end": { "column": 1, "line": 24, "offset": 477 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": ":root" }, { "raws": { "before": "\n\n", "between": "", "semicolon": false, "after": "" }, "type": "rule", "nodes": [ { "raws": { "before": "", "between": ":" }, "type": "decl", "source": { "end": { "column": 11, "line": 26, "offset": 490 }, "start": { "column": 7, "line": 26, "offset": 485 } }, "prop": "--a", "value": "1" } ], "source": { "end": { "column": 12, "line": 26, "offset": 491 }, "start": { "column": 1, "line": 26, "offset": 479 } }, "selector": ":root" }, { "raws": { "before": "\n\n", "between": " ", "semicolon": false, "after": "" }, "type": "rule", "nodes": [ { "raws": { "before": "", "between": ":", "value": { "raw": "/**/ ", "value": " " } }, "type": "decl", "source": { "end": { "column": 33, "line": 28, "offset": 526 }, "start": { "column": 18, "line": 28, "offset": 510 } }, "prop": "--empty-end", "value": " " } ], "source": { "end": { "column": 35, "line": 28, "offset": 528 }, "start": { "column": 1, "line": 28, "offset": 493 } }, "selector": ".semicolon-less" }, { "raws": { "before": "\n\n", "between": "", "semicolon": false, "after": "" }, "type": "rule", "nodes": [ { "raws": { "before": "", "between": ":" }, "type": "decl", "source": { "end": { "column": 11, "line": 30, "offset": 541 }, "start": { "column": 8, "line": 30, "offset": 537 } }, "prop": "--a", "value": " " } ], "source": { "end": { "column": 13, "line": 30, "offset": 543 }, "start": { "column": 1, "line": 30, "offset": 530 } }, "selector": ".empty" } ], "source": { "end": { "column": 14, "line": 30, "offset": 543 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/decls.css000066400000000000000000000000571523757322100226640ustar00rootroot00000000000000a { color: black; background: white; } postcss-postcss-parser-tests-4dac536/cases/decls.json000066400000000000000000000031111523757322100230370ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 2, "offset": 21 }, "start": { "column": 5, "line": 2, "offset": 8 } }, "prop": "color", "value": "black" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 3, "offset": 44 }, "start": { "column": 5, "line": 3, "offset": 26 } }, "prop": "background", "value": "white" } ], "source": { "end": { "column": 1, "line": 4, "offset": 46 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 2, "line": 4, "offset": 46 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/empty.css000066400000000000000000000000001523757322100227140ustar00rootroot00000000000000postcss-postcss-parser-tests-4dac536/cases/empty.json000066400000000000000000000003551523757322100231120ustar00rootroot00000000000000{ "raws": { "after": "" }, "type": "root", "nodes": [], "source": { "end": { "column": 1, "line": 1, "offset": 0 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/escape.css000066400000000000000000000005211523757322100230260ustar00rootroot00000000000000a { background: url("a).png"); background: url(a;a); background: url(a/*); background: \;a; } :not([foo=")"]) { } :not(div/*)*/) { } :not(:nth-child(2n of [foo=")"])) { } [foo=\"] { } [foo=\{] { } [foo=\(] { } [foo=yes\:\(it\'s\ work\)] { } \@noat { } h1\\{ color: \\; } [attr=;] { } .prop { \62 olor: red } postcss-postcss-parser-tests-4dac536/cases/escape.json000066400000000000000000000175371523757322100232260ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 30, "line": 2, "offset": 34 }, "start": { "column": 5, "line": 2, "offset": 8 } }, "prop": "background", "value": "url(\"a).png\")" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 25, "line": 3, "offset": 60 }, "start": { "column": 5, "line": 3, "offset": 39 } }, "prop": "background", "value": "url(a;a)" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 25, "line": 4, "offset": 86 }, "start": { "column": 5, "line": 4, "offset": 65 } }, "prop": "background", "value": "url(a/*)" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 20, "line": 5, "offset": 107 }, "start": { "column": 5, "line": 5, "offset": 91 } }, "prop": "background", "value": "\\;a" } ], "source": { "end": { "column": 1, "line": 6, "offset": 109 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" }, { "raws": { "before": "\n\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 19, "line": 8, "offset": 130 }, "start": { "column": 1, "line": 8, "offset": 111 } }, "selector": ":not([foo=\")\"])" }, { "raws": { "before": "\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 18, "line": 9, "offset": 149 }, "start": { "column": 1, "line": 9, "offset": 131 } }, "selector": ":not(div/*)*/)" }, { "raws": { "before": "\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 37, "line": 10, "offset": 187 }, "start": { "column": 1, "line": 10, "offset": 150 } }, "selector": ":not(:nth-child(2n of [foo=\")\"]))" }, { "raws": { "before": "\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 12, "line": 11, "offset": 200 }, "start": { "column": 1, "line": 11, "offset": 188 } }, "selector": "[foo=\\\"]" }, { "raws": { "before": "\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 12, "line": 12, "offset": 213 }, "start": { "column": 1, "line": 12, "offset": 201 } }, "selector": "[foo=\\{]" }, { "raws": { "before": "\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 12, "line": 13, "offset": 226 }, "start": { "column": 1, "line": 13, "offset": 214 } }, "selector": "[foo=\\(]" }, { "raws": { "before": "\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 30, "line": 14, "offset": 257 }, "start": { "column": 1, "line": 14, "offset": 227 } }, "selector": "[foo=yes\\:\\(it\\'s\\ work\\)]" }, { "raws": { "before": "\n\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 10, "line": 16, "offset": 269 }, "start": { "column": 1, "line": 16, "offset": 259 } }, "selector": "\\@noat" }, { "raws": { "before": "\n\n", "between": "", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 14, "line": 19, "offset": 291 }, "start": { "column": 5, "line": 19, "offset": 281 } }, "prop": "color", "value": "\\\\" } ], "source": { "end": { "column": 1, "line": 20, "offset": 293 }, "start": { "column": 1, "line": 18, "offset": 271 } }, "selector": "h1\\\\" }, { "raws": { "before": "\n\n", "between": " ", "after": " " }, "type": "rule", "nodes": [], "source": { "end": { "column": 12, "line": 22, "offset": 307 }, "start": { "column": 1, "line": 22, "offset": 295 } }, "selector": "[attr=;]" }, { "raws": { "before": "\n\n", "between": " ", "semicolon": false, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 25, "offset": 334 }, "start": { "column": 5, "line": 25, "offset": 321 } }, "prop": "\\62 olor", "value": "red" } ], "source": { "end": { "column": 1, "line": 26, "offset": 336 }, "start": { "column": 1, "line": 24, "offset": 309 } }, "selector": ".prop" } ], "source": { "end": { "column": 2, "line": 26, "offset": 336 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/extends.css000066400000000000000000000000731523757322100232420ustar00rootroot00000000000000one: 1; a { two: 2; b { three: 3; } } postcss-postcss-parser-tests-4dac536/cases/extends.json000066400000000000000000000050201523757322100234200ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": ": " }, "type": "decl", "source": { "end": { "column": 7, "line": 1, "offset": 7 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "prop": "one", "value": "1" }, { "raws": { "before": "\n\n", "between": " ", "semicolon": false, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 11, "line": 4, "offset": 24 }, "start": { "column": 5, "line": 4, "offset": 17 } }, "prop": "two", "value": "2" }, { "raws": { "before": "\n ", "between": " ", "semicolon": true, "after": "\n " }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 6, "offset": 50 }, "start": { "column": 9, "line": 6, "offset": 41 } }, "prop": "three", "value": "3" } ], "source": { "end": { "column": 5, "line": 7, "offset": 56 }, "start": { "column": 5, "line": 5, "offset": 29 } }, "selector": "b" } ], "source": { "end": { "column": 1, "line": 8, "offset": 58 }, "start": { "column": 1, "line": 3, "offset": 9 } }, "selector": "a" } ], "source": { "end": { "column": 2, "line": 8, "offset": 58 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/function.css000066400000000000000000000003171523757322100234160ustar00rootroot00000000000000a { background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); background-image: url("./image (1).jpg"); background-image: url( './image (1).jpg' ); } postcss-postcss-parser-tests-4dac536/cases/function.json000066400000000000000000000042561523757322100236050ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 106, "line": 2, "offset": 110 }, "start": { "column": 5, "line": 2, "offset": 8 } }, "prop": "background-image", "value": "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 45, "line": 3, "offset": 156 }, "start": { "column": 5, "line": 3, "offset": 115 } }, "prop": "background-image", "value": "url(\"./image (1).jpg\")" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 47, "line": 4, "offset": 204 }, "start": { "column": 5, "line": 4, "offset": 161 } }, "prop": "background-image", "value": "url( './image (1).jpg' )" } ], "source": { "end": { "column": 1, "line": 5, "offset": 206 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 2, "line": 5, "offset": 206 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/ie-progid.css000066400000000000000000000001751523757322100234520ustar00rootroot00000000000000a { filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); } postcss-postcss-parser-tests-4dac536/cases/ie-progid.json000066400000000000000000000023401523757322100236270ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 118, "line": 2, "offset": 122 }, "start": { "column": 5, "line": 2, "offset": 8 } }, "prop": "filter", "value": "progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3)" } ], "source": { "end": { "column": 1, "line": 3, "offset": 124 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 2, "line": 3, "offset": 124 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/important.css000066400000000000000000000006301523757322100236040ustar00rootroot00000000000000a { width: 1px!important; color: black !important ; } p { prop: important; color: red important; margin: 10px ! important; padding: 20px ! /* test */ important; width: 100px ! /*! test */ important; height: 100px /*! test */ important; z-index: 1 ""! important; padding: 1px/* sep */!important; left: 10 !IMPORTANT; right: 10 ! IMPORTANT; } postcss-postcss-parser-tests-4dac536/cases/important.json000066400000000000000000000166501523757322100237760ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": ", "important": "!important" }, "type": "decl", "source": { "end": { "column": 25, "line": 2, "offset": 29 }, "start": { "column": 5, "line": 2, "offset": 8 } }, "prop": "width", "important": true, "value": "1px" }, { "raws": { "before": "\n ", "between": ": ", "important": " !important " }, "type": "decl", "source": { "end": { "column": 30, "line": 3, "offset": 60 }, "start": { "column": 5, "line": 3, "offset": 34 } }, "prop": "color", "important": true, "value": "black" } ], "source": { "end": { "column": 1, "line": 4, "offset": 62 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" }, { "raws": { "before": "\n\n", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 20, "line": 7, "offset": 88 }, "start": { "column": 5, "line": 7, "offset": 72 } }, "prop": "prop", "value": "important" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 25, "line": 8, "offset": 114 }, "start": { "column": 5, "line": 8, "offset": 93 } }, "prop": "color", "value": "red important" }, { "raws": { "before": "\n ", "between": ": ", "important": " ! important" }, "type": "decl", "source": { "end": { "column": 39, "line": 9, "offset": 154 }, "start": { "column": 5, "line": 9, "offset": 119 } }, "prop": "margin", "important": true, "value": "10px" }, { "raws": { "before": "\n ", "between": ": ", "important": " ! /* test */ important" }, "type": "decl", "source": { "end": { "column": 48, "line": 10, "offset": 203 }, "start": { "column": 5, "line": 10, "offset": 159 } }, "prop": "padding", "important": true, "value": "20px" }, { "raws": { "before": "\n ", "between": ": ", "important": " ! /*! test */ important" }, "type": "decl", "source": { "end": { "column": 41, "line": 11, "offset": 245 }, "start": { "column": 5, "line": 11, "offset": 208 } }, "prop": "width", "important": true, "value": "100px" }, { "raws": { "before": "\n ", "between": ": ", "value": { "raw": "100px /*! test */ important", "value": "100px important" } }, "type": "decl", "source": { "end": { "column": 40, "line": 12, "offset": 286 }, "start": { "column": 5, "line": 12, "offset": 250 } }, "prop": "height", "value": "100px important" }, { "raws": { "before": "\n ", "between": ": ", "important": "! important" }, "type": "decl", "source": { "end": { "column": 29, "line": 13, "offset": 316 }, "start": { "column": 5, "line": 13, "offset": 291 } }, "prop": "z-index", "important": true, "value": "1 \"\"" }, { "raws": { "before": "\n ", "between": ": ", "important": "!important", "value": { "raw": "1px/* sep */", "value": "1px" } }, "type": "decl", "source": { "end": { "column": 36, "line": 14, "offset": 353 }, "start": { "column": 5, "line": 14, "offset": 321 } }, "prop": "padding", "important": true, "value": "1px" }, { "raws": { "before": "\n ", "between": ": ", "important": " !IMPORTANT" }, "type": "decl", "source": { "end": { "column": 24, "line": 15, "offset": 378 }, "start": { "column": 5, "line": 15, "offset": 358 } }, "prop": "left", "important": true, "value": "10" }, { "raws": { "before": "\n ", "between": ": ", "important": " ! IMPORTANT" }, "type": "decl", "source": { "end": { "column": 26, "line": 16, "offset": 405 }, "start": { "column": 5, "line": 16, "offset": 383 } }, "prop": "right", "important": true, "value": "10" } ], "source": { "end": { "column": 1, "line": 17, "offset": 407 }, "start": { "column": 1, "line": 6, "offset": 64 } }, "selector": "p" } ], "source": { "end": { "column": 2, "line": 17, "offset": 407 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/inside.css000066400000000000000000000000261523757322100230410ustar00rootroot00000000000000a { @import "a.css" } postcss-postcss-parser-tests-4dac536/cases/inside.json000066400000000000000000000022301523757322100232210ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": false, "after": "" }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": " ", "afterName": " " }, "type": "atrule", "name": "import", "source": { "end": { "column": 19, "line": 1, "offset": 19 }, "start": { "column": 5, "line": 1, "offset": 4 } }, "params": "\"a.css\"" } ], "source": { "end": { "column": 21, "line": 1, "offset": 21 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 22, "line": 1, "offset": 21 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/no-selector.css000066400000000000000000000000031523757322100240130ustar00rootroot00000000000000{} postcss-postcss-parser-tests-4dac536/cases/no-selector.json000066400000000000000000000012041523757322100242000ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": "", "after": "" }, "type": "rule", "nodes": [], "source": { "end": { "column": 2, "line": 1, "offset": 2 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "" } ], "source": { "end": { "column": 3, "line": 1, "offset": 2 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/prop.css000066400000000000000000000001411523757322100225440ustar00rootroot00000000000000a { *color : black; _background: white; font-size/**/: big; $(var)-size: 100%; } postcss-postcss-parser-tests-4dac536/cases/prop.json000066400000000000000000000047611523757322100227410ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n *", "between": " : " }, "type": "decl", "source": { "end": { "column": 19, "line": 2, "offset": 23 }, "start": { "column": 5, "line": 2, "offset": 8 } }, "prop": "color", "value": "black" }, { "raws": { "before": "\n _", "between": ": " }, "type": "decl", "source": { "end": { "column": 23, "line": 3, "offset": 47 }, "start": { "column": 5, "line": 3, "offset": 28 } }, "prop": "background", "value": "white" }, { "raws": { "before": "\n ", "between": "/**/: " }, "type": "decl", "source": { "end": { "column": 23, "line": 4, "offset": 71 }, "start": { "column": 5, "line": 4, "offset": 52 } }, "prop": "font-size", "value": "big" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 5, "offset": 94 }, "start": { "column": 5, "line": 5, "offset": 76 } }, "prop": "$(var)-size", "value": "100%" } ], "source": { "end": { "column": 1, "line": 6, "offset": 96 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 2, "line": 6, "offset": 96 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/quotes.css000066400000000000000000000000771523757322100231140ustar00rootroot00000000000000a::before { content: ";'@ /**/\""; content: '\'"\\'; } postcss-postcss-parser-tests-4dac536/cases/quotes.json000066400000000000000000000031421523757322100232710ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 26, "line": 2, "offset": 38 }, "start": { "column": 5, "line": 2, "offset": 16 } }, "prop": "content", "value": "\";'@ /**/\\\"\"" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 21, "line": 3, "offset": 60 }, "start": { "column": 5, "line": 3, "offset": 43 } }, "prop": "content", "value": "'\\'\"\\\\'" } ], "source": { "end": { "column": 1, "line": 4, "offset": 62 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a::before" } ], "source": { "end": { "column": 2, "line": 4, "offset": 62 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/raw-decl.css000066400000000000000000000000331523757322100232620ustar00rootroot00000000000000a { color: a/* ; */ b ; } postcss-postcss-parser-tests-4dac536/cases/raw-decl.json000066400000000000000000000023311523757322100234460ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": " " }, "type": "rule", "nodes": [ { "raws": { "before": " ", "between": ": ", "value": { "raw": "a/* ; */ b ", "value": "a b" } }, "type": "decl", "source": { "end": { "column": 24, "line": 1, "offset": 24 }, "start": { "column": 5, "line": 1, "offset": 4 } }, "prop": "color", "value": "a b" } ], "source": { "end": { "column": 26, "line": 1, "offset": 26 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 27, "line": 1, "offset": 26 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/rule-at.css000066400000000000000000000001361523757322100231410ustar00rootroot00000000000000a { width: 10px; margin: 0 @width; @mixin mobile { height: 100px; } } postcss-postcss-parser-tests-4dac536/cases/rule-at.json000066400000000000000000000052721523757322100233300ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": false, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 16, "line": 2, "offset": 20 }, "start": { "column": 5, "line": 2, "offset": 8 } }, "prop": "width", "value": "10px" }, { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 21, "line": 3, "offset": 42 }, "start": { "column": 5, "line": 3, "offset": 25 } }, "prop": "margin", "value": "0 @width" }, { "raws": { "before": "\n ", "between": " ", "afterName": " ", "semicolon": true, "after": "\n " }, "type": "atrule", "name": "mixin", "source": { "end": { "column": 5, "line": 6, "offset": 91 }, "start": { "column": 5, "line": 4, "offset": 47 } }, "params": "mobile", "nodes": [ { "raws": { "before": "\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 22, "line": 5, "offset": 85 }, "start": { "column": 9, "line": 5, "offset": 71 } }, "prop": "height", "value": "100px" } ] } ], "source": { "end": { "column": 1, "line": 7, "offset": 93 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 2, "line": 7, "offset": 93 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/rule-no-semicolon.css000066400000000000000000000000171523757322100251350ustar00rootroot00000000000000a{color:black} postcss-postcss-parser-tests-4dac536/cases/rule-no-semicolon.json000066400000000000000000000021601523757322100253170ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": "", "semicolon": false, "after": "" }, "type": "rule", "nodes": [ { "raws": { "before": "", "between": ":" }, "type": "decl", "source": { "end": { "column": 13, "line": 1, "offset": 13 }, "start": { "column": 3, "line": 1, "offset": 2 } }, "prop": "color", "value": "black" } ], "source": { "end": { "column": 14, "line": 1, "offset": 14 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 15, "line": 1, "offset": 14 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/selector.css000066400000000000000000000000421523757322100234040ustar00rootroot00000000000000 a/* { } */ b {} a/* test */b {} postcss-postcss-parser-tests-4dac536/cases/selector.json000066400000000000000000000021701523757322100235710ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "selector": { "raw": "a/* { } */ b", "value": "a b" }, "after": "" }, "type": "rule", "nodes": [], "source": { "end": { "column": 15, "line": 1, "offset": 15 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a b" }, { "raws": { "before": "\n\n", "between": " ", "after": "" }, "type": "rule", "nodes": [], "source": { "end": { "column": 15, "line": 3, "offset": 32 }, "start": { "column": 1, "line": 3, "offset": 17 } }, "selector": "a/* test */b" } ], "source": { "end": { "column": 16, "line": 3, "offset": 32 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/semicolons.css000066400000000000000000000001241523757322100237400ustar00rootroot00000000000000a {;; color: black; ; ; } aaa{b:c;} a{b:cc}; a{b:c} ; @a bbbb; /* ^ */ postcss-postcss-parser-tests-4dac536/cases/semicolons.json000066400000000000000000000107441523757322100241320ustar00rootroot00000000000000{ "raws": { "semicolon": true, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": true, "after": "\n ; ;\n" }, "type": "rule", "nodes": [ { "raws": { "before": ";;\n ", "between": ": " }, "type": "decl", "source": { "end": { "column": 17, "line": 2, "offset": 23 }, "start": { "column": 5, "line": 2, "offset": 10 } }, "prop": "color", "value": "black" } ], "source": { "end": { "column": 1, "line": 4, "offset": 33 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" }, { "raws": { "before": "\n\n", "between": "", "semicolon": true, "after": "" }, "type": "rule", "nodes": [ { "raws": { "before": "", "between": ":" }, "type": "decl", "source": { "end": { "column": 8, "line": 6, "offset": 43 }, "start": { "column": 5, "line": 6, "offset": 39 } }, "prop": "b", "value": "c" } ], "source": { "end": { "column": 9, "line": 6, "offset": 44 }, "start": { "column": 1, "line": 6, "offset": 35 } }, "selector": "aaa" }, { "raws": { "before": "\n", "between": "", "semicolon": false, "after": "", "ownSemicolon": ";" }, "type": "rule", "nodes": [ { "raws": { "before": "", "between": ":" }, "type": "decl", "source": { "end": { "column": 6, "line": 7, "offset": 51 }, "start": { "column": 3, "line": 7, "offset": 47 } }, "prop": "b", "value": "cc" } ], "source": { "end": { "column": 8, "line": 7, "offset": 53 }, "start": { "column": 1, "line": 7, "offset": 45 } }, "selector": "a" }, { "raws": { "before": "\n", "between": "", "semicolon": false, "after": "", "ownSemicolon": " ;" }, "type": "rule", "nodes": [ { "raws": { "before": "", "between": ":" }, "type": "decl", "source": { "end": { "column": 5, "line": 8, "offset": 59 }, "start": { "column": 3, "line": 8, "offset": 56 } }, "prop": "b", "value": "c" } ], "source": { "end": { "column": 8, "line": 8, "offset": 62 }, "start": { "column": 1, "line": 8, "offset": 54 } }, "selector": "a" }, { "raws": { "before": "\n", "between": "", "afterName": " " }, "type": "atrule", "name": "a", "source": { "end": { "column": 8, "line": 9, "offset": 71 }, "start": { "column": 1, "line": 9, "offset": 63 } }, "params": "bbbb" }, { "raws": { "before": "\n", "left": " ", "right": " " }, "type": "comment", "source": { "end": { "column": 11, "line": 10, "offset": 83 }, "start": { "column": 1, "line": 10, "offset": 72 } }, "text": "^" } ], "source": { "end": { "column": 12, "line": 10, "offset": 83 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/spaces.json000066400000000000000000000003601523757322100232260ustar00rootroot00000000000000{ "raws": { "after": " \n" }, "type": "root", "nodes": [], "source": { "end": { "column": 1, "line": 2, "offset": 2 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/cases/tab.css000066400000000000000000000000241523757322100223320ustar00rootroot00000000000000a { color: black } postcss-postcss-parser-tests-4dac536/cases/tab.json000066400000000000000000000021661523757322100225240ustar00rootroot00000000000000{ "raws": { "semicolon": false, "after": "" }, "type": "root", "nodes": [ { "raws": { "before": "", "between": " ", "semicolon": false, "after": "\n" }, "type": "rule", "nodes": [ { "raws": { "before": "\n\t", "between": ": " }, "type": "decl", "source": { "end": { "column": 13, "line": 2, "offset": 17 }, "start": { "column": 2, "line": 2, "offset": 5 } }, "prop": "color", "value": "black" } ], "source": { "end": { "column": 1, "line": 3, "offset": 19 }, "start": { "column": 1, "line": 1, "offset": 0 } }, "selector": "a" } ], "source": { "end": { "column": 2, "line": 3, "offset": 19 }, "start": { "column": 1, "line": 1, "offset": 0 } } } postcss-postcss-parser-tests-4dac536/each-test.js000066400000000000000000000011541523757322100221740ustar00rootroot00000000000000let { readdirSync, readFileSync } = require('node:fs') let { basename, extname, join } = require('node:path') let extra = require('./extra-cases') function read(file) { return readFileSync(join(__dirname, 'cases', file)) } module.exports = function eachTest(callback) { readdirSync(join(__dirname, 'cases')).forEach(i => { if (extname(i) !== '.json') return let json = JSON.parse(read(i).toString().trim()) let name = basename(i, '.json') let css = extra[name] if (!css) { css = read(name + '.css') .toString() .trim() } callback(name + '.css', css, json) }) } postcss-postcss-parser-tests-4dac536/extra-cases.json000066400000000000000000000000541523757322100230710ustar00rootroot00000000000000{ "spaces": " \n", "bom": "\uFEFFa{}" } postcss-postcss-parser-tests-4dac536/get.js000066400000000000000000000032751523757322100211040ustar00rootroot00000000000000let https = require('node:https') let zlib = require('node:zlib') let pico = require('picocolors') function showError(url, message) { process.stderr.write( '\n' + pico.red(url) + '\n' + pico.bgRed(' Request error ') + ' ' + message + '\n' ) process.exit(1) } function download(url, callback, errors = 0) { function onError(e) { if (errors > 2) showError(url, e.toString()) process.stderr.write(e.toString() + '\n') download(url, callback, errors + 1) } https .get( url, { headers: { 'accept-encoding': 'gzip,deflate' } }, res => { if (res.statusCode >= 300 && res.statusCode <= 399) { download(res.headers.location, callback, 0) } else if (res.statusCode >= 200 && res.statusCode <= 299) { callback(res) } else { showError(url, res.statusCode) } res.on('error', onError) } ) .on('error', onError) } module.exports = async function get(url) { return new Promise(resolve => { download(url, res => { let chunks = [] res.on('data', i => { chunks.push(i) }) res.on('end', () => { let buffer = Buffer.concat(chunks) if (res.headers['content-encoding'] === 'gzip') { zlib.gunzip(buffer, (err, decoded) => { if (err) throw err resolve(decoded.toString()) }) } else if (res.headers['content-encoding'] === 'deflate') { zlib.inflate(buffer, (err, decoded) => { if (err) throw err resolve(decoded.toString()) }) } else { resolve(buffer.toString()) } }) }) }) } postcss-postcss-parser-tests-4dac536/index.d.ts000066400000000000000000000004441523757322100216630ustar00rootroot00000000000000export function jsonify(node: object): object export function testPath(name: string): string export function eachTest( callback: (name: string, css: string, json: object) => void ): void export function testOnReal( callback: (css: string) => { css: string }, extra: string[] ): void postcss-postcss-parser-tests-4dac536/index.js000066400000000000000000000003301523757322100214210ustar00rootroot00000000000000let eachTest = require('./each-test') let jsonify = require('./jsonify') let testOnReal = require('./test-on-real') let testPath = require('./test-path') module.exports = { eachTest, jsonify, testOnReal, testPath } postcss-postcss-parser-tests-4dac536/index.mjs000066400000000000000000000003161523757322100216020ustar00rootroot00000000000000import eachTest from './each-test.js' import jsonify from './jsonify.js' import testOnReal from './test-on-real.js' import testPath from './test-path.js' export { eachTest, jsonify, testOnReal, testPath } postcss-postcss-parser-tests-4dac536/jsonify.js000066400000000000000000000006241523757322100220010ustar00rootroot00000000000000function clean(node) { if (node.source) { delete node.source.input delete node.source.inputId } delete node.inputs delete node.indexes delete node.lastEach delete node.rawCache if (node.nodes) node.nodes = node.nodes.map(clean) return node } module.exports = function jsonify(node) { let cleaned = clean(node.toJSON()) return JSON.parse(JSON.stringify(cleaned, null, 2)) } postcss-postcss-parser-tests-4dac536/load.js000066400000000000000000000017041523757322100212370ustar00rootroot00000000000000let get = require('./get') function findLinks(html, url) { let files = html.match(/[^"]+\.css"|[^']\.css'/g) if (!files) { throw new Error("Can't find CSS links at " + url) } return files.map(i => { let path = i.slice(0, -1) if (/^https?:/.test(path)) { return path } else if (path.startsWith('//')) { return 'https:' + path } else { return path.replace(/^\.?\/?/, url) } }) } module.exports = async function load(succeed, urls, callback) { let used = new Set() await Promise.all( urls.map(async url => { used.add(url) if (url.endsWith('.css')) { callback(await get(url), url) } else { let files = findLinks(await get(url), url) succeed(url) await Promise.all( files.map(async file => { if (used.has(file)) return used.add(file) callback(await get(file), file) }) ) } }) ) } postcss-postcss-parser-tests-4dac536/oxfmt.config.ts000066400000000000000000000002061523757322100227270ustar00rootroot00000000000000import loguxOxfmtConfig from '@logux/oxc-configs/fmt' export default { ...loguxOxfmtConfig, ignorePatterns: ['cases/**/*.css'] } postcss-postcss-parser-tests-4dac536/oxlint.config.ts000066400000000000000000000002371523757322100231130ustar00rootroot00000000000000import loguxOxlintConfig from '@logux/oxc-configs/lint' import { defineConfig } from 'oxlint' export default defineConfig({ extends: [loguxOxlintConfig] }) postcss-postcss-parser-tests-4dac536/package.json000066400000000000000000000020401523757322100222420ustar00rootroot00000000000000{ "name": "postcss-parser-tests", "version": "8.10.0", "description": "Base tests for every PostCSS CSS parser", "keywords": [ "css", "parser", "postcss", "tests" ], "license": "MIT", "author": "Andrey Sitnik ", "repository": "postcss/postcss-parser-tests", "funding": [ { "type": "opencollective", "url": "https://opencollective.com/postcss/" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "exports": { ".": { "require": "./index.js", "import": "./index.mjs" }, "./package.json": "./package.json" }, "scripts": { "test:lint": "oxlint .", "test:unit": "bnt", "test": "pnpm run /^test:/" }, "dependencies": { "picocolors": "^1.1.1" }, "devDependencies": { "@logux/oxc-configs": "^1.1.0", "better-node-test": "^1.0.0", "eslint-plugin-prefer-let": "^4.2.2", "oxlint": "^1.78.0", "oxlint-tsgolint": "^7.0.2001", "postcss": "^8.5.26", "typescript": "^7.0.2" } } postcss-postcss-parser-tests-4dac536/pnpm-lock.yaml000066400000000000000000000467261523757322100225630ustar00rootroot00000000000000lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false importers: .: dependencies: picocolors: specifier: ^1.1.1 version: 1.1.1 devDependencies: '@logux/oxc-configs': specifier: ^1.1.0 version: 1.1.0(oxlint-tsgolint@7.0.2001)(oxlint@1.78.0(oxlint-tsgolint@7.0.2001))(typescript@7.0.2) better-node-test: specifier: ^1.0.0 version: 1.0.0 eslint-plugin-prefer-let: specifier: ^4.2.2 version: 4.2.2 oxlint: specifier: ^1.78.0 version: 1.78.0(oxlint-tsgolint@7.0.2001) oxlint-tsgolint: specifier: ^7.0.2001 version: 7.0.2001 postcss: specifier: ^8.5.26 version: 8.5.26 typescript: specifier: ^7.0.2 version: 7.0.2 packages: '@logux/oxc-configs@1.1.0': resolution: {integrity: sha512-X+yJcCwTpwnaESokhw2zjH2Wn+XAUGX3VsEToYBQzXfgdXQ4IMCyjTUURKhHO+9JoSL+vGgxtqaF7LMGtPHj5w==} engines: {node: '>=22.0.0'} peerDependencies: oxlint: ^1.57.0 oxlint-tsgolint: '>=0.18.1' typescript: ^6.0.2 || ^7.0.0 '@oxlint-tsgolint/darwin-arm64@7.0.2001': resolution: {integrity: sha512-CUJEdbSZ54+Xy9OXqOhWLTKZKV0BBiV7C2i/ygyVmXtkUNXx5YCzN8DpSSshTAKktoL7S+tnQ/ftFG/i7X896w==} cpu: [arm64] os: [darwin] '@oxlint-tsgolint/darwin-x64@7.0.2001': resolution: {integrity: sha512-pXfBb5BqONCcgrXQNUZWXgiYmRSWJzd97S8i41VVOh6ut0tyo+cJ5FKFpczDHxiVNfj/3e7c9B4MtztNdpIVCw==} cpu: [x64] os: [darwin] '@oxlint-tsgolint/linux-arm64@7.0.2001': resolution: {integrity: sha512-roP7zujb/QDPzDwEKsFFpzNHHy91/Y7oX9vQXk78ekyZtcQj1QXDIMH33gjDdHBfRl4K9pZ36xhRgrP4Zr+R8A==} cpu: [arm64] os: [linux] '@oxlint-tsgolint/linux-x64@7.0.2001': resolution: {integrity: sha512-UDezNqdECVmngu2TPnjaS1YoAmcTaBoI5lV9vk3VahBxoi+I5r9k3iJTT7qZoYWOXTD/7T7bNcwRgrocR6BscQ==} cpu: [x64] os: [linux] '@oxlint-tsgolint/win32-arm64@7.0.2001': resolution: {integrity: sha512-uJZhqB6pdXLuN+AD1F5082byyQti/NPmJA77GtcFlmT2HzRelqbNls3SaIqxpjdFgvSBF9g0yOKGBkGFg7kX8Q==} cpu: [arm64] os: [win32] '@oxlint-tsgolint/win32-x64@7.0.2001': resolution: {integrity: sha512-FkDRm8hx9OwzGQqyWG1tO5QrTLRApff9DzSgpz9QZau37BR8d1VYKOxMLGf6shPZntJFoTwIIJYT68VndYDCog==} cpu: [x64] os: [win32] '@oxlint/binding-android-arm-eabi@1.78.0': resolution: {integrity: sha512-Bu819lmAfZMUHErrpe0cEWj3iaefuUODHSU8+UbXy67V/r7/7f4K3FL0NmbD85E+wiFLDYuhP8Zlv0XnVeXshw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] '@oxlint/binding-android-arm64@1.78.0': resolution: {integrity: sha512-CDfxZgB61B7buRdY2FJoAYYPPXCZ1EoC1LKscnC5dg3kjobdxiconvAvvN1BmHyW4PyFT3jRLDag/BY/roSNBQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] '@oxlint/binding-darwin-arm64@1.78.0': resolution: {integrity: sha512-2Y2U9Ahrz+OO0Ej88f9SJYq51/jUBp1Mc7iZu0ukrbeeZ3gpRGfzIFnoqfHDY96xr0GEfNrPUBFEy0nN5aD7HA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] '@oxlint/binding-darwin-x64@1.78.0': resolution: {integrity: sha512-rpych6eJq6m9jDRypTEaPD1xysaEW5h9+xuxhGK/QhOg+/xaqPZrCrTNoIl/f3nEjuJeCEmstNDlrE9rJi/3/g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] '@oxlint/binding-freebsd-x64@1.78.0': resolution: {integrity: sha512-IcMGrQT3QizkOESUJd5et+rOhVqSkNDfNik1cvrKDqIbzqx9KMtRswpFgkCuNTSwylCFLKhGUu8KmqY1ZnC0Dg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] '@oxlint/binding-linux-arm-gnueabihf@1.78.0': resolution: {integrity: sha512-/uLdoJ0IXE6vo/0f0LKjinQAp+re+VMaCWaNT8ENIv2EOCkSsc8SGaflXAuW0Jua2dq5+GLVWm1NQK7P3UFSNQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] '@oxlint/binding-linux-arm-musleabihf@1.78.0': resolution: {integrity: sha512-7xi4Wb/O8NRJhLoUXmDJMUVpNYvB5kefdhFU1Jb8rtae4QoXlTiLwI14X4YvAXVZLNZChP8m5qO9SQAlWQTbkQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] '@oxlint/binding-linux-arm64-gnu@1.78.0': resolution: {integrity: sha512-4hFW0+fVXa3OIh1Y4A5SPkmvI4wuuBSrCVKzOyE7PTjhc7yEqZ1pmvEEeS5Lj/MaqvegFxXyF33N+6jkehxdyg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] '@oxlint/binding-linux-arm64-musl@1.78.0': resolution: {integrity: sha512-oC0mvsgBJjlMijSDEhx9KuvR9zYeHXceA9MjbuXB1F8NSR78Yj2unOBrstEvTVaq+pko+kuue6DajC00eqvTdg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] '@oxlint/binding-linux-ppc64-gnu@1.78.0': resolution: {integrity: sha512-XAllT5SUZS+ohjuZ3/5S0cwe0r7eboiuigeStCZ5DXRYx/2KVM2UvQXvAfyzXEimtQjAB7cDQ2YxDe2Zl2WNQQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] '@oxlint/binding-linux-riscv64-gnu@1.78.0': resolution: {integrity: sha512-trucMER/0QtecoXvc1y/UVqE3kwJipDwrx4oHfj+nNm3dq2zjP44WT0CfHNDPM3G1DXIkx/gY6lAD21NSCZVhA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] '@oxlint/binding-linux-riscv64-musl@1.78.0': resolution: {integrity: sha512-cm3O4F/HQbdzOUX5mKHqG5KDL6E5w0pnlZ+fbBy2rmLryPOowkuLagFHTopQsEIpjcaZoPOrL+BmmAytAG9HFg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] '@oxlint/binding-linux-s390x-gnu@1.78.0': resolution: {integrity: sha512-33wRf6HqGNsybJ3qX4cGaQN2ODPxNmc1rMa0mrTmx3eFq1VzOnvQooi9bIGVYakW8a/wmqVx1mgsUm8R2xfTiw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] '@oxlint/binding-linux-x64-gnu@1.78.0': resolution: {integrity: sha512-rRdISSYegj6VganMZ9tjRjijowfHJ09IZU01i0toBAqr6n5LEtwHq2IeS4FjW2RoskOHlb6efB26H5izYb3GEQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] '@oxlint/binding-linux-x64-musl@1.78.0': resolution: {integrity: sha512-GmsP4rW0xTL6u5CVdcDsaN5Fbc7hBc382Wmar1kttbnwSEviM+rSINKOMQ+UQ6iH+AGwC+8gaAiwu134Tgh6Lg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] '@oxlint/binding-openharmony-arm64@1.78.0': resolution: {integrity: sha512-sy9yeYuADc8a+n4TLBayzMCZiHPW78DcIFVpOXTmdKHWQeM9xe5uzkqIIZmi326D5hY9XVwacipEB1p7tQjPAg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] '@oxlint/binding-win32-arm64-msvc@1.78.0': resolution: {integrity: sha512-rjc2hF1KfMi8fZj1X/m3AmnHbdsF3rL0v6KQg0Uc880Yb2khjz+3U14sfdZ7jWTpRnN1m1NQa/TT7uU9lJWPrA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] '@oxlint/binding-win32-ia32-msvc@1.78.0': resolution: {integrity: sha512-zcuXFVrEFHIafRfkCQT8w/Xe41o07ozl/vwHq7p94vB29xVzsB0sZGYORU1jhcYKv3Lr0J3HbJ2T4fHH5rWmvA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] '@oxlint/binding-win32-x64-msvc@1.78.0': resolution: {integrity: sha512-Sb5ocmLSuYeOuXd+CFOToGKp/gjXUEWDnvIGwhnh8aq8wY4TMmEnKnvbogSW7RdMZv77JSARduS7/gv+khYEjA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] '@typescript/typescript-aix-ppc64@7.0.2': resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} engines: {node: '>=16.20.0'} cpu: [ppc64] os: [aix] '@typescript/typescript-darwin-arm64@7.0.2': resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} engines: {node: '>=16.20.0'} cpu: [arm64] os: [darwin] '@typescript/typescript-darwin-x64@7.0.2': resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} engines: {node: '>=16.20.0'} cpu: [x64] os: [darwin] '@typescript/typescript-freebsd-arm64@7.0.2': resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} engines: {node: '>=16.20.0'} cpu: [arm64] os: [freebsd] '@typescript/typescript-freebsd-x64@7.0.2': resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} engines: {node: '>=16.20.0'} cpu: [x64] os: [freebsd] '@typescript/typescript-linux-arm64@7.0.2': resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} engines: {node: '>=16.20.0'} cpu: [arm64] os: [linux] '@typescript/typescript-linux-arm@7.0.2': resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} engines: {node: '>=16.20.0'} cpu: [arm] os: [linux] '@typescript/typescript-linux-loong64@7.0.2': resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} engines: {node: '>=16.20.0'} cpu: [loong64] os: [linux] '@typescript/typescript-linux-mips64el@7.0.2': resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} engines: {node: '>=16.20.0'} cpu: [mips64el] os: [linux] '@typescript/typescript-linux-ppc64@7.0.2': resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} engines: {node: '>=16.20.0'} cpu: [ppc64] os: [linux] '@typescript/typescript-linux-riscv64@7.0.2': resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} engines: {node: '>=16.20.0'} cpu: [riscv64] os: [linux] '@typescript/typescript-linux-s390x@7.0.2': resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} engines: {node: '>=16.20.0'} cpu: [s390x] os: [linux] '@typescript/typescript-linux-x64@7.0.2': resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} engines: {node: '>=16.20.0'} cpu: [x64] os: [linux] '@typescript/typescript-netbsd-arm64@7.0.2': resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} engines: {node: '>=16.20.0'} cpu: [arm64] os: [netbsd] '@typescript/typescript-netbsd-x64@7.0.2': resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} engines: {node: '>=16.20.0'} cpu: [x64] os: [netbsd] '@typescript/typescript-openbsd-arm64@7.0.2': resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} engines: {node: '>=16.20.0'} cpu: [arm64] os: [openbsd] '@typescript/typescript-openbsd-x64@7.0.2': resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} engines: {node: '>=16.20.0'} cpu: [x64] os: [openbsd] '@typescript/typescript-sunos-x64@7.0.2': resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} engines: {node: '>=16.20.0'} cpu: [x64] os: [sunos] '@typescript/typescript-win32-arm64@7.0.2': resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} engines: {node: '>=16.20.0'} cpu: [arm64] os: [win32] '@typescript/typescript-win32-x64@7.0.2': resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} engines: {node: '>=16.20.0'} cpu: [x64] os: [win32] better-node-test@1.0.0: resolution: {integrity: sha512-15Dz6VMm0sH5zwxKmOxEwrrOttcQ/z2bhAAAQOujScYxQqO3rlU3rtE1/Vfkcu7rpwaqZ0iqmrwE26G4hwDlVg==} engines: {node: ^22.0.0 || ^24.0.0 || >=26.0.0} hasBin: true eslint-plugin-prefer-let@4.2.2: resolution: {integrity: sha512-FkCmQwZtc4nf6EKDKEYW/lWtApDXxsJA/VXWQQemLhIWWho676CJdgt53AMubOrSOTzzep0dBMP9zVFCCCdxsw==} engines: {node: '>=0.10.0'} nanoid@3.3.18: resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true oxlint-tsgolint@7.0.2001: resolution: {integrity: sha512-KjK/XLcXr1DSyonKhsuFqJRiuKqcyG9j3LJ8nkOsrLzGvodBPqzHOKauy10asLMDI0sUpvb+1sxlzff3udZvfg==} hasBin: true oxlint@1.78.0: resolution: {integrity: sha512-QgQePuxIqKOzo1KSjG2EnITEeWvWnKAm77eq8nrMtf6AGoA+zyGc4PFYtDNJSD25g/ibOwfQ851hZ4/SPkMVoA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: oxlint-tsgolint: '>=7.0.2001' vite-plus: '*' peerDependenciesMeta: oxlint-tsgolint: optional: true vite-plus: optional: true picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} postcss@8.5.26: resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} engines: {node: ^10 || ^12 || >=14} requireindex@1.2.0: resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} engines: {node: '>=0.10.5'} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} typescript@7.0.2: resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} engines: {node: '>=16.20.0'} hasBin: true snapshots: '@logux/oxc-configs@1.1.0(oxlint-tsgolint@7.0.2001)(oxlint@1.78.0(oxlint-tsgolint@7.0.2001))(typescript@7.0.2)': dependencies: eslint-plugin-prefer-let: 4.2.2 oxlint: 1.78.0(oxlint-tsgolint@7.0.2001) oxlint-tsgolint: 7.0.2001 typescript: 7.0.2 '@oxlint-tsgolint/darwin-arm64@7.0.2001': optional: true '@oxlint-tsgolint/darwin-x64@7.0.2001': optional: true '@oxlint-tsgolint/linux-arm64@7.0.2001': optional: true '@oxlint-tsgolint/linux-x64@7.0.2001': optional: true '@oxlint-tsgolint/win32-arm64@7.0.2001': optional: true '@oxlint-tsgolint/win32-x64@7.0.2001': optional: true '@oxlint/binding-android-arm-eabi@1.78.0': optional: true '@oxlint/binding-android-arm64@1.78.0': optional: true '@oxlint/binding-darwin-arm64@1.78.0': optional: true '@oxlint/binding-darwin-x64@1.78.0': optional: true '@oxlint/binding-freebsd-x64@1.78.0': optional: true '@oxlint/binding-linux-arm-gnueabihf@1.78.0': optional: true '@oxlint/binding-linux-arm-musleabihf@1.78.0': optional: true '@oxlint/binding-linux-arm64-gnu@1.78.0': optional: true '@oxlint/binding-linux-arm64-musl@1.78.0': optional: true '@oxlint/binding-linux-ppc64-gnu@1.78.0': optional: true '@oxlint/binding-linux-riscv64-gnu@1.78.0': optional: true '@oxlint/binding-linux-riscv64-musl@1.78.0': optional: true '@oxlint/binding-linux-s390x-gnu@1.78.0': optional: true '@oxlint/binding-linux-x64-gnu@1.78.0': optional: true '@oxlint/binding-linux-x64-musl@1.78.0': optional: true '@oxlint/binding-openharmony-arm64@1.78.0': optional: true '@oxlint/binding-win32-arm64-msvc@1.78.0': optional: true '@oxlint/binding-win32-ia32-msvc@1.78.0': optional: true '@oxlint/binding-win32-x64-msvc@1.78.0': optional: true '@typescript/typescript-aix-ppc64@7.0.2': optional: true '@typescript/typescript-darwin-arm64@7.0.2': optional: true '@typescript/typescript-darwin-x64@7.0.2': optional: true '@typescript/typescript-freebsd-arm64@7.0.2': optional: true '@typescript/typescript-freebsd-x64@7.0.2': optional: true '@typescript/typescript-linux-arm64@7.0.2': optional: true '@typescript/typescript-linux-arm@7.0.2': optional: true '@typescript/typescript-linux-loong64@7.0.2': optional: true '@typescript/typescript-linux-mips64el@7.0.2': optional: true '@typescript/typescript-linux-ppc64@7.0.2': optional: true '@typescript/typescript-linux-riscv64@7.0.2': optional: true '@typescript/typescript-linux-s390x@7.0.2': optional: true '@typescript/typescript-linux-x64@7.0.2': optional: true '@typescript/typescript-netbsd-arm64@7.0.2': optional: true '@typescript/typescript-netbsd-x64@7.0.2': optional: true '@typescript/typescript-openbsd-arm64@7.0.2': optional: true '@typescript/typescript-openbsd-x64@7.0.2': optional: true '@typescript/typescript-sunos-x64@7.0.2': optional: true '@typescript/typescript-win32-arm64@7.0.2': optional: true '@typescript/typescript-win32-x64@7.0.2': optional: true better-node-test@1.0.0: {} eslint-plugin-prefer-let@4.2.2: dependencies: requireindex: 1.2.0 nanoid@3.3.18: {} oxlint-tsgolint@7.0.2001: optionalDependencies: '@oxlint-tsgolint/darwin-arm64': 7.0.2001 '@oxlint-tsgolint/darwin-x64': 7.0.2001 '@oxlint-tsgolint/linux-arm64': 7.0.2001 '@oxlint-tsgolint/linux-x64': 7.0.2001 '@oxlint-tsgolint/win32-arm64': 7.0.2001 '@oxlint-tsgolint/win32-x64': 7.0.2001 oxlint@1.78.0(oxlint-tsgolint@7.0.2001): optionalDependencies: '@oxlint/binding-android-arm-eabi': 1.78.0 '@oxlint/binding-android-arm64': 1.78.0 '@oxlint/binding-darwin-arm64': 1.78.0 '@oxlint/binding-darwin-x64': 1.78.0 '@oxlint/binding-freebsd-x64': 1.78.0 '@oxlint/binding-linux-arm-gnueabihf': 1.78.0 '@oxlint/binding-linux-arm-musleabihf': 1.78.0 '@oxlint/binding-linux-arm64-gnu': 1.78.0 '@oxlint/binding-linux-arm64-musl': 1.78.0 '@oxlint/binding-linux-ppc64-gnu': 1.78.0 '@oxlint/binding-linux-riscv64-gnu': 1.78.0 '@oxlint/binding-linux-riscv64-musl': 1.78.0 '@oxlint/binding-linux-s390x-gnu': 1.78.0 '@oxlint/binding-linux-x64-gnu': 1.78.0 '@oxlint/binding-linux-x64-musl': 1.78.0 '@oxlint/binding-openharmony-arm64': 1.78.0 '@oxlint/binding-win32-arm64-msvc': 1.78.0 '@oxlint/binding-win32-ia32-msvc': 1.78.0 '@oxlint/binding-win32-x64-msvc': 1.78.0 oxlint-tsgolint: 7.0.2001 picocolors@1.1.1: {} postcss@8.5.26: dependencies: nanoid: 3.3.18 picocolors: 1.1.1 source-map-js: 1.2.1 requireindex@1.2.0: {} source-map-js@1.2.1: {} typescript@7.0.2: optionalDependencies: '@typescript/typescript-aix-ppc64': 7.0.2 '@typescript/typescript-darwin-arm64': 7.0.2 '@typescript/typescript-darwin-x64': 7.0.2 '@typescript/typescript-freebsd-arm64': 7.0.2 '@typescript/typescript-freebsd-x64': 7.0.2 '@typescript/typescript-linux-arm': 7.0.2 '@typescript/typescript-linux-arm64': 7.0.2 '@typescript/typescript-linux-loong64': 7.0.2 '@typescript/typescript-linux-mips64el': 7.0.2 '@typescript/typescript-linux-ppc64': 7.0.2 '@typescript/typescript-linux-riscv64': 7.0.2 '@typescript/typescript-linux-s390x': 7.0.2 '@typescript/typescript-linux-x64': 7.0.2 '@typescript/typescript-netbsd-arm64': 7.0.2 '@typescript/typescript-netbsd-x64': 7.0.2 '@typescript/typescript-openbsd-arm64': 7.0.2 '@typescript/typescript-openbsd-x64': 7.0.2 '@typescript/typescript-sunos-x64': 7.0.2 '@typescript/typescript-win32-arm64': 7.0.2 '@typescript/typescript-win32-x64': 7.0.2 postcss-postcss-parser-tests-4dac536/test-on-real.js000066400000000000000000000020171523757322100226300ustar00rootroot00000000000000let pico = require('picocolors') let load = require('./load') const SITES = [ 'https://github.com/', 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.css' ] function succeed(url) { let text = url.replace(/^https?:\/\//, '') process.stdout.write(pico.green('✔ ') + text + '\n') } module.exports = async function testOnReal(callback, extra = []) { await load(succeed, SITES.concat(extra), (css, url) => { let result try { result = callback(css).css } catch (e) { process.stderr.write( '\n' + pico.red(url) + '\n' + pico.bgRed(' Parsing error ') + ' ' ) if (e.name === 'CssSyntaxError') { process.stderr.write(pico.red(e.message)) } else { process.stderr.write(pico.red(e.stack)) } process.stderr.write('\n') process.exit(1) } if (result !== css) { process.stderr.write( '\n' + pico.red(url) + '\n' + pico.bgRed(' Different output ') + '\n' ) process.exit(1) } succeed(url) }) } postcss-postcss-parser-tests-4dac536/test-path.js000066400000000000000000000001721523757322100222270ustar00rootroot00000000000000let { join } = require('node:path') module.exports = function testPath(name) { return join(__dirname, 'cases', name) } postcss-postcss-parser-tests-4dac536/test/000077500000000000000000000000001523757322100207375ustar00rootroot00000000000000postcss-postcss-parser-tests-4dac536/test/jsonify.test.js000066400000000000000000000024711523757322100237400ustar00rootroot00000000000000let { deepStrictEqual } = require('node:assert') let { test } = require('node:test') let postcss = require('postcss') let jsonify = require('../jsonify') test('converts to JSON string', () => { let node = postcss.rule() deepStrictEqual(jsonify(node), { nodes: [], raws: {}, type: 'rule' }) }) test('converts source.input', () => { let node = postcss.rule({ source: { input: new postcss.Input('test', { from: '/a.css' }) } }) node.each(() => {}) deepStrictEqual(jsonify(node), { nodes: [], raws: {}, source: {}, type: 'rule' }) }) test('converts source.input recursively', () => { let rule = postcss.rule({ source: { end: { column: 15, line: 1, offset: 14 }, input: new postcss.Input('test', { from: '/a.css' }), start: { column: 1, line: 1, offset: 0 } } }) let root = postcss.root() root.append(rule) deepStrictEqual(jsonify(root), { nodes: [ { nodes: [], raws: {}, source: { end: { column: 15, line: 1, offset: 14 }, start: { column: 1, line: 1, offset: 0 } }, type: 'rule' } ], raws: {}, type: 'root' }) }) postcss-postcss-parser-tests-4dac536/test/path.test.js000066400000000000000000000004111523757322100232030ustar00rootroot00000000000000let { deepStrictEqual } = require('node:assert') let { join } = require('node:path') let { test } = require('node:test') let { testPath } = require('../') test('returns path', () => { deepStrictEqual(testPath('tab.css'), join(__dirname, '../cases/tab.css')) }) postcss-postcss-parser-tests-4dac536/test/update.js000077500000000000000000000016041523757322100225630ustar00rootroot00000000000000#!/usr/bin/env node let fs = require('node:fs') let path = require('node:path') let postcss = require('../../postcss/lib/postcss') let extra = require('../extra-cases') let jsonify = require('../jsonify') let cases = path.join(__dirname, '..', 'cases') function read(file) { return fs.readFileSync(path.join(cases, file)).toString() } fs.readdirSync(cases).forEach(i => { if (path.extname(i) !== '.json') return let name = path.basename(i, '.json') let css = extra[name] if (!css) css = read(name + '.css').trim() let root try { root = postcss.parse(css, { from: '/' + name + '.css' }) } catch (e) { process.stderr.write('\n./cases/' + name + '.css\n' + e.stack + '\n') process.exit(1) } let json = JSON.stringify(jsonify(root), null, 2) fs.writeFileSync(path.join(cases, name + '.json'), json + '\n') process.stdout.write('.') }) process.stdout.write('\n') postcss-postcss-parser-tests-4dac536/tsconfig.json000066400000000000000000000002151523757322100224650ustar00rootroot00000000000000{ "compilerOptions": { "target": "esnext", "module": "commonjs", "allowJs": true, "strict": true, "noEmit": true } }