Skip to content

duplicate *events def in timeseries.js v0.9.0 #203

@ikappaki

Description

@ikappaki

There is an duplicate, identical, *events definition in timeseries.js.

Although this appears not to cause issues loading the module in any JS VM, it does break when trying to compile with google-closure-compiler in simple mode (v0.8.x is where the v0.9.0 release tag was taken from):

Your branch is up to date with 'origin/v0.8.x'.
Switched to branch 'v0.8.x'
d:/src/pond $ npx google-closure-compiler --js=lib/lib/timeseries.js --compilation_level "SIMPLE"
npx: installed 29 in 2.717s
lib/lib/timeseries.js:524: ERROR - [JSC_DUPLICATE_CLASS_METHODS] Class contains duplicate method name "events"
  524|   *events() {
          ^^^^^^

The issue manifests itself when referencing the package with ClojureScript (which uses the google clojure compiler), and more specifically when using the rect-timeseries-charts npm module which depends on pondjs v0.9.0.

I assume the duplicate *events def was unintentional, and thus I would consider this an (almost harmless) "bug".

PR to follow.

duplicate:

pond/lib/lib/timeseries.js

Lines 524 to 528 in 1a873b7

*events() {
for (var i = 0; i < this.size(); i++) {
yield this.at(i);
}
} //

first occurance:

pond/lib/lib/timeseries.js

Lines 393 to 397 in 1a873b7

*events() {
for (var i = 0; i < this.size(); i++) {
yield this.at(i);
}
}

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions