Skip to content

Commit

Permalink
stringify fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Aug 29, 2023
1 parent 3c5bd1e commit 8c96576
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/components/encoding-column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export default function EncodingColumn(props: EncodingColumnProps): JSX.Element
setAllTemplateValues={setAllTemplateValues}
setTemplateValue={setTemplateValue}
setWidgetValue={setWidgetValue}
disallowFanout={template.disallowFanOut}
disallowFanout={!!template.disallowFanOut}
customCards={template.customCards}
setMaterialization={setMaterialization}
widgetValue={templateMap.paramValues[widget.name]}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/code-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useState} from 'react';
import {connect} from 'react-redux';
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';

import MonacoWrapper from '../components/monaco-wrapper';
import ErrorBoundary from '../components/error-boundary';
Expand Down
2 changes: 1 addition & 1 deletion src/languages/unit-vis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {useEffect} from 'react';
import {LanguageExtension, RendererProps, Template, Suggestion} from '../types';
import {log} from '../utils';
import {walkTreeAndLookForFields, buildSynthesizer} from './suggestion-utils';
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import UnitVis from 'unit-vis';

const QUERY_KEY = 'atom-key-special-container';
Expand Down
2 changes: 1 addition & 1 deletion src/languages/vega-lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
TemplateMap,
} from '../types';
import {buildSynthesizer, walkTreeAndLookForFields, difference} from './suggestion-utils';
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';

import React from 'react';
import {Vega} from 'react-vega';
Expand Down
2 changes: 1 addition & 1 deletion src/languages/vega.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {LanguageExtension} from '../types';
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import * as x from 'vega-projection-extended';
// necessary footwork to force the projections to be imported
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/template-actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import produce from 'immer';
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {TEMPLATE_BODY, MATERIALIZING, JSON_OUTPUT} from '../constants';
import {
ModifyValueOnTemplatePayload,
Expand Down
2 changes: 1 addition & 1 deletion src/templates/atom-example.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template} from '../types';
import {AUTHORS} from '../constants/index';
const UNIT_VIS_EXAMPLE: any = {
Expand Down
2 changes: 1 addition & 1 deletion src/templates/atom.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Widget, Template, GenWidget, SliderWidget, QueryResult} from '../types';
import {simpleList} from './polestar-template-utils';
import {AUTHORS} from '../constants/index';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/bee-swarm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template} from '../types';
import {VEGA_CATEGORICAL_COLOR_SCHEMES} from './vega-common';
import {toList} from './polestar-template-utils';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/parallel-coordinates.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template} from '../types';
import {toList} from './polestar-template-utils';
import {AUTHORS} from '../constants/index';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/pie-chart.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template} from '../types';
import {VEGA_CATEGORICAL_COLOR_SCHEMES, AGGREGATES} from './vega-common';
import {toList} from './polestar-template-utils';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/polestar-template.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template, GenWidget, Condition, Widget, ListWidget} from '../types';
import {Json, JsonMap} from '../types';
import {AUTHORS} from '../constants/index';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/radar-chart.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// WIP THIS ONE IS HARD
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template} from '../types';
import {AUTHORS} from '../constants/index';
const cols = [0, 1, 2, 3, 4, 5];
Expand Down
2 changes: 1 addition & 1 deletion src/templates/scatterplot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template} from '../types';
import {toList} from './polestar-template-utils';
import {AUTHORS} from '../constants/index';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/simple-scatterplot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {Template} from '../types';
import {AUTHORS} from '../constants/index';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {
DataTargetWidget,
MultiDataTargetWidget,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/monaco.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Cribbed from vega-editor
import * as stringify from 'json-stringify-pretty-compact';
import stringify from '../utils/stringify';
import {parse as parseJSONC} from 'jsonc-parser';
// import * as Monaco from 'monaco-editor/esm/vs/editor/editor.api';
import {mergeDeep} from 'vega-lite/build/src/util';
Expand Down
3 changes: 3 additions & 0 deletions src/utils/stringify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// some dumb foot work to try to make both build and test envs happy
const stringify = require("json-stringify-pretty-compact");
export default stringify;

0 comments on commit 8c96576

Please sign in to comment.