Skip to content

Update TypeScript target to ES6#137

Merged
albertyw merged 1 commit intouber:masterfrom
zxbodya:enabled-es6-fix-errors
Feb 19, 2026
Merged

Update TypeScript target to ES6#137
albertyw merged 1 commit intouber:masterfrom
zxbodya:enabled-es6-fix-errors

Conversation

@zxbodya
Copy link
Copy Markdown
Contributor

@zxbodya zxbodya commented Feb 19, 2026

Updating TypeScript target to ES6, enabling class support in published code.

This is needed to avoid issues related to edge cases transpiling es6 classes.

Noticed the issue when trying to publish the dashboard with an expired auth token - instead of the expected authentication error, there was an exception while creating it:

node_modules/grafana-dash-gen/grafana/errors.js:62
        return _super !== null && _super.apply(this, arguments) || this;
                                         ^

TypeError: Class constructor StructuredError cannot be invoked without 'new'
    at new ResponseError (node_modules/grafana-dash-gen/grafana/errors.js:62:42)
    at ResponseError.create (node_modules/error/index.js:105:12)
    at grafana-dash-gen/grafana/publish.js:73:40
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Updating TypeScript target to ES6.

This is needed to avoid issues related to edge cases transpiling es6 classes.

Noticed this, when trying to publish dashboard with expired auth token:

```
node_modules/grafana-dash-gen/grafana/errors.js:62
        return _super !== null && _super.apply(this, arguments) || this;
                                         ^

TypeError: Class constructor StructuredError cannot be invoked without 'new'
    at new ResponseError (node_modules/grafana-dash-gen/grafana/errors.js:62:42)
    at ResponseError.create (node_modules/error/index.js:105:12)
    at grafana-dash-gen/grafana/publish.js:73:40
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
```
@albertyw albertyw merged commit d288ad2 into uber:master Feb 19, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants