{"id":16247197,"url":"https://github.com/dotnetcarpenter/bug-postcss-purgecss","last_synced_at":"2025-10-18T22:31:32.145Z","repository":{"id":66935909,"uuid":"297810354","full_name":"dotnetCarpenter/bug-postcss-purgecss","owner":"dotnetCarpenter","description":"created isolated test case to reproduce bug https://github.com/FullHuman/purgecss/issues/483","archived":false,"fork":false,"pushed_at":"2020-09-23T01:04:53.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T08:12:31.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotnetCarpenter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-23T00:46:59.000Z","updated_at":"2020-09-23T01:04:55.000Z","dependencies_parsed_at":"2023-02-22T06:30:55.909Z","dependency_job_id":null,"html_url":"https://github.com/dotnetCarpenter/bug-postcss-purgecss","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"738237a638271b4bb85af18ea584d28f9f9105d5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetCarpenter%2Fbug-postcss-purgecss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetCarpenter%2Fbug-postcss-purgecss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetCarpenter%2Fbug-postcss-purgecss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetCarpenter%2Fbug-postcss-purgecss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnetCarpenter","download_url":"https://codeload.github.com/dotnetCarpenter/bug-postcss-purgecss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838415,"owners_count":21004576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T14:36:14.771Z","updated_at":"2025-10-18T22:31:32.079Z","avatar_url":"https://github.com/dotnetCarpenter.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeError: t.test is not a function\n\n\nBefore you open an issue, please check if a similar issue already exists or has been closed before.\n\n### When reporting a bug, please try to include the following:\n- [X] A descriptive title\n- [X] An *isolated* way to reproduce the behavior (example: GitHub repository with code isolated to the issue that anyone can clone to observe the problem)\n- [X] What package and version  you're using, and the platform(s) you're running it on\n- [X] The behavior you expect to see, and the actual behavior\n\nhttps://github.com/dotnetCarpenter/bug-postcss-purgecss\n\n## Steps to reproduce:\n\n1. `git clone git@github.com:dotnetCarpenter/bug-postcss-purgecss.git \u0026\u0026 cd bug-postcss-purgecss`\n2. `yarn install`\n3. `yarn build`\n4. Observe the errors in your terminal.\n\nEnabling/disabling plugins in [postcss.config.js](https://github.com/dotnetCarpenter/bug-postcss-purgecss/blob/master/postcss.config.js) seems to suggest the [`postcss-import`](https://github.com/postcss/postcss-import) plugin being the culprit. Disabling `postcss-import` does remove the errors but does not generate a valid CSS file. It probably only remove the errors because purgecss is not actually doing any work.\n\n## Actual behavior\n\nTens of similar error messages.\n\n```\nyarn run v1.22.5\n$ postcss src/style.css --config postcss.config.js --output _site/assets/style.css\n(node:10007) UnhandledPromiseRejectionWarning: TypeError: t.test is not a function\n    at /home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/lib/purgecss.js:1:7958\n    at Array.some (\u003canonymous\u003e)\n    at U.isSelectorSafelistedDeep (/home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/lib/purgecss.js:1:7948)\n    at U.shouldKeepSelector (/home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/lib/purgecss.js:1:9213)\n    at /home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/lib/purgecss.js:1:6477\n    at /home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/node_modules/postcss-selector-parser/dist/selectors/container.js:228:20\n    at Root.each (/home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/node_modules/postcss-selector-parser/dist/selectors/container.js:210:16)\n    at Root.walk (/home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/node_modules/postcss-selector-parser/dist/selectors/container.js:227:17)\n    at Processor.func (/home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/lib/purgecss.js:1:6439)\n    at Processor._runSync (/home/dotnet/projects/playground/bug-postcss-purgecss/node_modules/purgecss/node_modules/postcss-selector-parser/dist/processor.js:104:26)\n(node:10007) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)\n(node:10007) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\n```\n\n**The resulting CSS file look fine.**\n\n## Expected behavior\n\nThe same as the actual behavior but without all of the errors.\n\n- OS: Ubuntu 20.04 (WSL2 Windows 10)\n- Nodejs: v12.18.3\n- **purgecss**: 3.0.0\n- **@fullhuman/postcss-purgecss**: 3.0.0\n- PostCSS: 7.0.34\n- PostCSS CLI: 7.1.2\n- autoprefixer: 7.2.6\n- postcss-css-variables: 0.17.0\n- postcss-import: 12.0.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnetcarpenter%2Fbug-postcss-purgecss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnetcarpenter%2Fbug-postcss-purgecss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnetcarpenter%2Fbug-postcss-purgecss/lists"}