Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unterminated group error for "{*,sub/*}.html" #75

Open
Krinkle opened this issue Sep 13, 2021 · 0 comments
Open

Unterminated group error for "{*,sub/*}.html" #75

Krinkle opened this issue Sep 13, 2021 · 0 comments

Comments

@Krinkle
Copy link

Krinkle commented Sep 13, 2021

const glob = require( "tiny-glob/sync" );

const files = glob( "{*,reporter-html/*}.html", {
	cwd: __dirname + "/../",
	filesOnly: true
} )

With an input like:

  • a.html
  • reporter-html/b.html
  • other/c.html
    SyntaxError: Invalid regular expression: /^(([^/]*)|reporter-html$/: Unterminated group
        at new RegExp (<anonymous>)
        at add (/qunit/node_modules/globrex/index.js:42:40)
        at globrex (/qunit/node_modules/globrex/index.js:62:13)
        at module.exports (/qunit/node_modules/tiny-glob/sync.js:75:20)
        at Object.QUnit.module (/qunit/test/cli/structure.js:57:17)
        at processModule (/qunit/qunit/qunit.js:1325:40)
        at Object.module$1 [as module] (/qunit/qunit/qunit.js:1361:5)
        at Object.QUnit.module (/qunit/test/cli/structure.js:53:8)
        at processModule (/qunit/qunit/qunit.js:1325:40)
        at Object.module$1 [as module] (/qunit/qunit/qunit.js:1361:5)

I tried the following (unsuccessful) workaround:

glob( "{*.html,reporter-html/*.html}" );

// SyntaxError: Invalid regular expression: /^(([^/]*)\.html|reporter-html$/: Unterminated group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant