{"id":26182,"library":"regexpu-fixtures","title":"regexpu-fixtures","description":"Test fixtures (test cases) for the regexpu project, which transpiles ES2015 Unicode regular expressions to ES5. Version 2.1.6 is stable. The package contains JSON data used by regexpu's test suite and may be reused by other JavaScript regex tools. No active development since the last release. Differentiator: provides a comprehensive set of test cases for Unicode-aware regex transpilation.","status":"maintenance","version":"2.1.6","language":"javascript","source_language":"en","source_url":"https://github.com/mathiasbynens/regexpu-fixtures","tags":["javascript","codegen","desugaring","ecmascript","es5","es6","harmony","refactoring"],"install":[{"cmd":"npm install regexpu-fixtures","lang":"bash","label":"npm"},{"cmd":"yarn add regexpu-fixtures","lang":"bash","label":"yarn"},{"cmd":"pnpm add regexpu-fixtures","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"No default export from package; import the JSON file directly. In CommonJS, use `require('regexpu-fixtures/data.json')`.","wrong":"const data = require('regexpu-fixtures');","symbol":"data","correct":"import data from 'regexpu-fixtures/data.json' assert { type: 'json' };"},{"note":"Path requires extension. ESM import assertion required for JSON modules.","wrong":"const rawFixtures = require('regexpu-fixtures/raw-fixtures');","symbol":"rawFixtures","correct":"import rawFixtures from 'regexpu-fixtures/raw-fixtures.json' assert { type: 'json' };"},{"note":"Use full path to JSON file.","wrong":"import es6 from 'regexpu-fixtures';","symbol":"es6","correct":"import es6 from 'regexpu-fixtures/es6.json' assert { type: 'json' };"}],"quickstart":{"code":"import data from 'regexpu-fixtures/data.json' assert { type: 'json' };\nconsole.log(Object.keys(data)); // List of fixture categories\n// Access specific test cases\nconst es5fixtures = data['es5-fixtures'];\nconsole.log(es5fixtures.length); // Number of test cases","lang":"typescript","description":"Shows how to import and inspect the test fixture data from regexpu-fixtures."},"warnings":[{"fix":"Use import with path to .json file and assert type (ESM) or require with .json extension (CJS).","message":"No default export from the package; you must import JSON files by their full path with extension.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Import a specific file: import data from 'regexpu-fixtures/data.json' assert { type: 'json' };","cause":"Importing the package without specifying a JSON file path.","error":"Cannot find module 'regexpu-fixtures'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}