refactor: remove implicit content sniffing and table conversion
- Split loadCSV into parseCSVString (content) and loadCSVFromPath (path); drop isCSV/looksLikeCsv heuristics - Delete coerceSparkTables and markedTable label-header magic; plain markdown tables now render as plain tables - Add explicit markdown role=spark-table fence syntax that converts pipe tables to CSV at scan time, with dice-header validation - Map ESM-only github-slugger and csv-parse browser build to CJS in jest config; add content-registry tests
This commit is contained in:
@@ -7,6 +7,10 @@ export default {
|
||||
moduleNameMapper: {
|
||||
// Resolve .js imports to .ts source files (ESM convention in TS source)
|
||||
'^(.+)\\.js$': ['$1.ts', '$1.tsx', '$1.js'],
|
||||
// github-slugger v2 is ESM-only; jest's CJS runtime cannot require it.
|
||||
'^github-slugger$': '<rootDir>/__mocks__/github-slugger.js',
|
||||
// Same for the browser ESM build of csv-parse — map to the CJS build.
|
||||
'^csv-parse/browser/esm/sync$': 'csv-parse/sync',
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.tsx?$': [
|
||||
|
||||
Reference in New Issue
Block a user