-
Notifications
You must be signed in to change notification settings - Fork 83
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
Fil/xlsx #249
Conversation
(avoids a crash on my computer; solution found at tapjs/tapjs#624)
@@ -13,7 +13,7 @@ | |||
"url": "https://github.com/observablehq/stdlib.git" | |||
}, | |||
"scripts": { | |||
"test": "tap 'test/**/*-test.js'", | |||
"test": "tap 'test/**/*-test.js' --reporter classic", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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'
]
}
There was a problem hiding this comment.
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
* 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>
No description provided.