hestiaAI / hestialabs-experiences

HestiaLabs Data Experiences & Digipower Academy
https://digipower.academy
Other
7 stars 1 forks source link

Avoid importing from neighboring projects #1159

Closed andreaskundig closed 1 year ago

andreaskundig commented 1 year ago

Imports from other projects should always go through package.json, not just grabbing a js file from the neighboring project.

https://github.com/hestiaAI/hestialabs-experiences/blob/master/experiences/store/index.js#L2

import BubbleAPI from '../../data-experience/src/utils/bubble-api

I find 5 such imports, maybe there are more:

./experiences/store/index.js:2:import BubbleAPI from '../../data-experience/src/utils/bubble-api' ./packages/hestias-hearth/index.ts:22:import DBMS from '../../data-experience/src/utils/sql.js' ./packages/hestias-hearth/index.ts:23:import FileManagerClass from '../../data-experience/src/utils/file-manager.js' ./packages/hestias-hearth/index.ts:24:import { NodeFile } from '../../data-experience/src/utils/node-file.js' ./packages/hestias-hearth/index.ts:25:import fileManagerWorkers from '../../data-experience/src/utils/file-manager-workers.js'

valentinoli commented 1 year ago

This one is on me

valentinoli commented 1 year ago

I tried fixing the imports in hestias-hearth but it just isn't working. It is because data-experience doesn't have "type": "module" in its package.json, which makes the compiler think it doesn't support ES modules.

I will try to migrate data-experience to use ESM exclusively