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

SyntaxError: Unexpected token '?' when action is executed #1103

Open
jnsvd opened this issue Sep 13, 2021 · 2 comments
Open

SyntaxError: Unexpected token '?' when action is executed #1103

jnsvd opened this issue Sep 13, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@jnsvd
Copy link

jnsvd commented Sep 13, 2021

How would you describe the issue?

An error occurs when auto-merge is attempted since v2.9.31 (and the corresponding bump of the v2 tag).

How can we reproduce the issue?

Push a new commit that leads to an action execution with an auto-merge step.

What are the expected results?

Auto-merge being executed.

What are the actual results?

The following error is observed:

Run ridedott/merge-me-action@v2
  with:
    GITHUB_LOGIN: <redacted>
    MERGE_METHOD: SQUASH
    GITHUB_TOKEN: ***
    ENABLE_GITHUB_API_PREVIEW: false
    ENABLED_FOR_MANUAL_CHANGES: false
    MAXIMUM_RETRIES: 3
  env:
    ACR_RELEASE: <redacted>.azurecr.io
/home/runner/work/_actions/ridedott/merge-me-action/v2/dist/index.js.cache.js:25
 */const s=r(5680);const toRegexRange=(e,t,r)=>{if(s(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(s(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let o={relaxZeros:true,...r};if(typeof o.strictZeros==="boolean"){o.relaxZeros=o.strictZeros===false}let n=String(o.relaxZeros);let i=String(o.shorthand);let a=String(o.capture);let u=String(o.wrap);let c=e+":"+t+"="+n+i+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(o.capture){return`(${r})`}if(o.wrap===false){return r}return`(?:${r})`}let d=hasPadding(e)||hasPadding(t);let m={min:e,max:t,a:l,b:p};let g=[];let h=[];if(d){m.isPadded=d;m.maxLen=String(m.max).length}if(l<0){let e=p<0?Math.abs(p):1;h=splitToPatterns(e,Math.abs(l),m,o);l=m.a=0
SyntaxError: Unexpected token '?'
    at new Script (vm.js:84:7)
    at Object.<anonymous> (/home/runner/work/_actions/ridedott/merge-me-action/v2/dist/index.js:6:16)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11

How much does it hurt?

We can specify the previous working version 2.9.30 to be used, but tag v2 is currently not working for us.

@xtazz
Copy link
Contributor

xtazz commented Sep 15, 2021

Hi @jnsvd! Thanks for reporting. We reverted a dependency update that we think caused it to break. So it should be fixed in v2.9.32, can you please check if it solves the problem for you?

@segadora
Copy link

works on my machine now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants