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

Fil/xlsx #249

Merged
merged 7 commits into from
Sep 7, 2021
Merged

Fil/xlsx #249

merged 7 commits into from
Sep 7, 2021

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Sep 6, 2021

No description provided.

@@ -13,7 +13,7 @@
"url": "https://github.com/observablehq/stdlib.git"
},
"scripts": {
"test": "tap 'test/**/*-test.js'",
"test": "tap 'test/**/*-test.js' --reporter classic",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the issue with the default reporter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly the same as tapjs/tapjs#624

~/Sites/observablehq/stdlib fil/xlsx* 41s
❯ yarn test
yarn run v1.22.11
$ tap 'test/**/*-test.js'
Error: Cannot find module './reports/base'
Require stack:
- /Users/fil/Sites/observablehq/stdlib/node_modules/jackspeak/noop.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:15)
    at resolveFileName (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/resolve-from/index.js:17:39)
    at resolveFrom (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/resolve-from/index.js:31:9)
    at module.exports (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/resolve-from/index.js:34:41)
    at importJSX (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/import-jsx/index.js:24:21)
    at module.exports (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/treport/lib/index.js:13:18)
    at exports.makeReporter (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:422:23)
    at runTests (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:744:3)
    at mainAsync (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:244:5)
    at main (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:127:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/fil/Sites/observablehq/stdlib/node_modules/jackspeak/noop.js'
  ]
}
TAP version 13
1..0
# time=0.973ms
----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
error Command failed with exit code 1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh weird. I wasn't running into that.

Copy link
Member

@visnup visnup Sep 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed a change to use the base reporter since it's the default, but with the explicit --reporter flag. let me know if that still works for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately:

~/Sites/observablehq/stdlib visnup/xlsx*
❯ yarn test
yarn run v1.22.11
$ tap 'test/**/*-test.js' --reporter base
Error: Cannot find module './reports/base'
Require stack:
- /Users/fil/Sites/observablehq/stdlib/node_modules/jackspeak/noop.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:15)
    at resolveFileName (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/resolve-from/index.js:17:39)
    at resolveFrom (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/resolve-from/index.js:31:9)
    at module.exports (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/resolve-from/index.js:34:41)
    at importJSX (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/import-jsx/index.js:24:21)
    at module.exports (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/node_modules/treport/lib/index.js:13:18)
    at exports.makeReporter (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:422:23)
    at runTests (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:744:3)
    at mainAsync (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:244:5)
    at main (/Users/fil/Sites/observablehq/stdlib/node_modules/tap/bin/run.js:127:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/fil/Sites/observablehq/stdlib/node_modules/jackspeak/noop.js'
  ]
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found another reference to the issue: nodejs/citgm#852 (comment)

❯ node -v
v16.9.0

@visnup visnup merged commit ee0dfbf into observablehq:visnup/xlsx Sep 7, 2021
@Fil Fil deleted the fil/xlsx branch September 7, 2021 19:32
visnup added a commit that referenced this pull request Sep 15, 2021
* XLSX support with ExcelJS

* Prettier

* Change range option to nested arrays

General code clean up

* Tests and bug fixes

* Respect header row order when resolving conflicts

* Fil/xlsx (#249)

* document xlsx (minimalist, we'll work on the notebook first)

* fix coverage reporter

(avoids a crash on my computer; solution found at tapjs/tapjs#624)

* unknown sheet name

* simplify rows naming

* NN is always called on string (cell specifier such as "AA99")

* test name

* more range specifiers

* Column only range test case

* sheetNames is enumerable

* One more test to check for empty columns

Prettier + use default/base tap reporter

* Add Node 16 to the test matrix

* Revert reporter to classic for Node 16

* Don't fail matrix quickly in actions

* More coverage.

* Example of .xlsx in README

* Remove Excel from Workbook naming

* Fix dates

* Fix for sharedFormula

* Coerce errors to NaN

* Properly escape html

* Make sheetNames read-only

* Require colons in range specifiers

* Include row numbers

* Use only string form ranges

* Coerce range specifiers to strings

* Update README.md

Co-authored-by: Mike Bostock <mbostock@gmail.com>

* Apply suggestions from code review

Co-authored-by: Mike Bostock <mbostock@gmail.com>

* Simplify hyperlinks

* Prettier

* Pass options through

* Rename helper functions for clarity, range tests

* Simpler

* Consistent comment format

* Consistent regexes

* Fix hyperlinks for certain cases

Co-authored-by: Philippe Rivière <fil@rezo.net>
Co-authored-by: Mike Bostock <mbostock@gmail.com>
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