Skip to content

Commit

Permalink
set type=module (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarshall authored Aug 9, 2023
1 parent 943692d commit 52025ab
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/data-inference/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/data-inference/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "@msrvida/data-inference",
"version": "1.0.1",
"version": "1.1.0",
"description": "Infer column types in tabular data.",
"main": "dist/es6/index.js",
"repository": {
"type": "git",
"url": "https://github.com/microsoft/SandDance.git",
"directory": "packages/data-inference"
},
"type": "module",
"types": "dist/es6/index.d.ts",
"files": [
"dist"
Expand Down
4 changes: 2 additions & 2 deletions packages/data-inference/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const fs = require('fs');
fs.copyFileSync('./dist/umd/data-inference.js', '../../docs/tests/data-inference/v1/js/data-inference.js');
import { copyFileSync } from 'fs';
copyFileSync('./dist/umd/data-inference.js', '../../docs/tests/data-inference/v1/js/data-inference.js');
8 changes: 4 additions & 4 deletions packages/data-inference/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

export * from './color';
export * from './inference';
export * from './numeric';
export * from './stats';
export * from './color.js';
export * from './inference.js';
export * from './numeric.js';
export * from './stats.js';
6 changes: 3 additions & 3 deletions packages/data-inference/src/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import { Column, ColumnTypeMap } from '@msrvida/chart-types';
import { inferTypes } from 'vega-typings';
import { checkIsColorData } from './color';
import { isQuantitative } from './numeric';
import { getStats } from './stats';
import { checkIsColorData } from './color.js';
import { isQuantitative } from './numeric.js';
import { getStats } from './stats.js';

/**
* Derive column metadata from the data array.
Expand Down
4 changes: 2 additions & 2 deletions packages/data-inference/src/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import { Column, ColumnStats } from '@msrvida/chart-types';
import { TypeInference } from 'vega-typings';
import { isColor } from './color';
import { detectNegative, detectSequentialColumn } from './numeric';
import { isColor } from './color.js';
import { detectNegative, detectSequentialColumn } from './numeric.js';

export function getStats(data: object[] | Float64Array, columnName: string | number, columnType: TypeInference, columnQuantitative: boolean, distinctValuesCallback?: (distinctValues: string[]) => void): ColumnStats;
export function getStats(data: object[], column: Column, distinctValuesCallback?: (distinctValues: string[]) => void): ColumnStats;
Expand Down

0 comments on commit 52025ab

Please sign in to comment.