Removed .js from all imports to smooth ts migration
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { CreatureProperty } from '/imports/api/creature/creatureProperties/CreatureProperties';
|
||||
import walkDown from '/imports/api/engine/computation/utility/walkdown.js';
|
||||
import walkDown from '/imports/api/engine/computation/utility/walkdown';
|
||||
import { TreeNode } from '/imports/api/parenting/parentingFunctions';
|
||||
import { isSpell } from '/imports/api/properties/Spells';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import walkDown from '/imports/api/engine/computation/utility/walkdown.js';
|
||||
import { getEffectTagTargets } from '/imports/api/engine/computation/buildComputation/linkTypeDependencies.js';
|
||||
import walkDown from '/imports/api/engine/computation/utility/walkdown';
|
||||
import { getEffectTagTargets } from '/imports/api/engine/computation/buildComputation/linkTypeDependencies';
|
||||
|
||||
export default function computeToggleDependencies(node, dependencyGraph, computation, forest) {
|
||||
const prop = node.doc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { traverse } from '/imports/parser/resolve.js';
|
||||
import { traverse } from '/imports/parser/resolve';
|
||||
|
||||
export default function linkCalculationDependencies(dependencyGraph, prop, { propsById }) {
|
||||
prop._computationDetails.calculations.forEach(calcObj => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import INLINE_CALCULATION_REGEX from '/imports/constants/INLINE_CALCULTION_REGEX.js';
|
||||
import { prettifyParseError, parse } from '/imports/parser/parser.js';
|
||||
import applyFnToKey from '/imports/api/engine/computation/utility/applyFnToKey.js';
|
||||
import INLINE_CALCULATION_REGEX from '/imports/constants/INLINE_CALCULTION_REGEX';
|
||||
import { prettifyParseError, parse } from '/imports/parser/parser';
|
||||
import applyFnToKey from '/imports/api/engine/computation/utility/applyFnToKey';
|
||||
import { get, set, unset } from 'lodash';
|
||||
import errorNode from '/imports/parser/parseTree/error.js';
|
||||
import cyrb53 from '/imports/api/engine/computation/utility/cyrb53.js';
|
||||
import errorNode from '/imports/parser/parseTree/error';
|
||||
import cyrb53 from '/imports/api/engine/computation/utility/cyrb53';
|
||||
|
||||
export default function parseCalculationFields(prop, schemas) {
|
||||
discoverInlineCalculationFields(prop, schemas);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import applyFnToKey from '../utility/applyFnToKey.js';
|
||||
import applyFnToKey from '../utility/applyFnToKey';
|
||||
import { unset } from 'lodash';
|
||||
|
||||
export default function removeSchemaFields(schemas, prop) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation.js';
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation';
|
||||
import { assert } from 'chai';
|
||||
import clean from '../../utility/cleanProp.testFn.js';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
|
||||
export default function () {
|
||||
let computation = buildComputationFromProps(testProperties);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation.js';
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation';
|
||||
import { assert } from 'chai';
|
||||
import clean from '../../utility/cleanProp.testFn.js';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
|
||||
export default function () {
|
||||
const computation = buildComputationFromProps(testProperties);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation.js';
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation';
|
||||
import { assert } from 'chai';
|
||||
import clean from '../../utility/cleanProp.testFn.js';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
|
||||
export default function(){
|
||||
export default function () {
|
||||
const computation = buildComputationFromProps(testProperties);
|
||||
const hasLink = computation.dependencyGraph.hasLink;
|
||||
assert.include(
|
||||
@@ -37,38 +37,38 @@ var testProperties = [
|
||||
_id: 'enabledToggleId',
|
||||
type: 'toggle',
|
||||
enabled: true,
|
||||
ancestors: [{id: 'charId'}],
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'disabledToggleId',
|
||||
type: 'toggle',
|
||||
disabled: true,
|
||||
ancestors: [{id: 'charId'}],
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'conditionToggleId',
|
||||
type: 'toggle',
|
||||
ancestors: [{id: 'charId'}],
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
// Children
|
||||
clean({
|
||||
_id: 'enabledToggleChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{id: 'charId'}, {id: 'enabledToggleId'}],
|
||||
ancestors: [{ id: 'charId' }, { id: 'enabledToggleId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'disabledToggleChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{id: 'charId'}, {id: 'disabledToggleId'}],
|
||||
ancestors: [{ id: 'charId' }, { id: 'disabledToggleId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'conditionToggleChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{id: 'charId'}, {id: 'conditionToggleId'}],
|
||||
ancestors: [{ id: 'charId' }, { id: 'conditionToggleId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'conditionToggleGrandChildId',
|
||||
type: 'folder',
|
||||
ancestors: [{id: 'charId'}, {id: 'conditionToggleId'}, {id: 'conditionToggleChildId'}],
|
||||
ancestors: [{ id: 'charId' }, { id: 'conditionToggleId' }, { id: 'conditionToggleChildId' }],
|
||||
}),
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation.js';
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation';
|
||||
import { assert } from 'chai';
|
||||
import clean from '../../utility/cleanProp.testFn.js';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
|
||||
export default function () {
|
||||
const computation = buildComputationFromProps(testProperties);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation.js';
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation';
|
||||
import { assert } from 'chai';
|
||||
import clean from '../../utility/cleanProp.testFn.js';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
import { applyNestedSetProperties } from '/imports/api/parenting/parentingFunctions';
|
||||
|
||||
export default function () {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation.js';
|
||||
import { buildComputationFromProps } from '/imports/api/engine/computation/buildCreatureComputation';
|
||||
import { assert } from 'chai';
|
||||
import clean from '../../utility/cleanProp.testFn.js';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
|
||||
export default function(){
|
||||
export default function () {
|
||||
const computation = buildComputationFromProps(testProperties);
|
||||
const getLink = computation.dependencyGraph.hasLink;
|
||||
const getNode = computation.dependencyGraph.getNode;
|
||||
@@ -22,6 +22,6 @@ var testProperties = [
|
||||
_id: 'strengthId',
|
||||
type: 'attribute',
|
||||
variableName: 'strength',
|
||||
ancestors: [{id: 'charId'}],
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user