#Developer workflow suggestions when working with typescript

4 messages · Page 1 of 1 (latest)

slim plaza
#

Background information:
We use Azure devops and kubernetes, and our frontend project (mono-repo) had the following structure:
apps/ - internal applications (not published to npm) that all use the internal packages but are independent of each other
packages/ - internal packages that all of the apps rely on (shared code)

We use turborepo and the build tool was vite and to upload versions, we would manually run vite build and then upload the static files to a server.
Each app would usually also update minor things in some of the internal packages most updates (but not always).
We wanted to implement a CI/CD pipeline, but the devops told us that because it's circular (app1 and app2 rely on package1), then we had to make the internal packages external (and publish them to npm).

Is our approach correct? what would you suggest we do differently?
How would the developer workflow work (switching between npm and local as u make changes in the packages)? - they want us to have a tsconfig alias and manually change all of the imports between the alias and the registry when we upload versions.
Is there a way to switch between local files and npm package with a command?
When should we upgrade package versions? Should it be automatic after pr to master or a separate step?

Sorry if this question is not related to typescript directly, I just don't know where to ask this.

hollow veldt
#

because it's circular (app1 and app2 rely on package1)
doesn't sound circular to me

#
app-1◄─┐ ┌─►app-2
       │ │
       │ │
       │ │
     package-1

that's acyclic

#

there shouldn't be any reason to ever need to publish to npm