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

Hidden dependency on assert package #672

Closed
wojciechczerniak opened this issue May 17, 2021 · 1 comment
Closed

Hidden dependency on assert package #672

wojciechczerniak opened this issue May 17, 2021 · 1 comment
Assignees
Labels
Bug Something isn't working

Comments

@wojciechczerniak
Copy link
Contributor

Description

Two files are importing assert package, which is not listed as our dependency. The build will fail in Webpack 5.

import assert from 'assert'

As the use of this dependency is limited to two lines:

public ensureThatVertexIsNonMatrixCellVertex(vertex: CellVertex | null) {
assert.ok(!(vertex instanceof MatrixVertex), 'Illegal operation')
}

const rangeVertex = this.dependencyGraph.getRange(rangeStart, rangeEnd)!
assert.ok(rangeVertex, 'Range does not exists in graph')
let value = rangeVertex.getFunctionValue(functionName) as (T | CellError)

I suggest to replace it with simpler if checks and remove it completely from the code base.

Your environment

  • HyperFormula version: 0.6.0
  • Browser Name and version: any
  • Operating System: any

Links

@wojciechczerniak wojciechczerniak added the Bug Something isn't working label May 17, 2021
@wojciechczerniak wojciechczerniak assigned budnix and unassigned bardek8 May 18, 2021
budnix added a commit that referenced this issue May 19, 2021
budnix added a commit that referenced this issue May 19, 2021
budnix added a commit that referenced this issue May 19, 2021
The commit removes redundant 'assert' dependency that is not
present in the browser environment.

Issue: #672
budnix added a commit that referenced this issue May 24, 2021
The commit removes redundant 'assert' dependency that is not
present in the browser environment.

Issue: #672
@wojciechczerniak
Copy link
Contributor Author

Done in #676

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