Skip to content

What should I start doing? #5

Closed
@skilbjo

Description

@skilbjo

I am a little broken... your project saved my sanity tonight (thank you very much) but I am worried that I am doing something wrong by having to use it ... can you document your motivations for the project and advice to ensure node compatibility going forward ?

Here is my rant ...
Transforming our codebase and internal libs from cjs -> esm was HORRIBLE and NOT WORTH IT. But what's done is done and the projects are using esm now. I had to use --experimental-specifier-resolution=node on node18 to get things running without doing more surgery on the project.

However when it came to bumping to node20, I found out unexpectedly that flag (--experimental-specifier-resolution) 1) is now a no-op and 2) not even a warning is emitted when using that flag anymore! WTF. And the suggested workaround in the docs is a lib that doesn't work. THANK YOU for creating this project and saving me from either 1) emergency unexpected work or 2) downgrading back to node18

Question is what should I be doing to get more conformity ... ie should I start migrating over to the .js extensions ? Any tsconfig.json changes that need to be paired with that ? I do use deep imports (import * as subPkg from '@skilbjo/pkg/dist/sub-package') - am I screwed and should I start changing that. And if so, advice would you give if I have a "monorepo" internal library with segmented file trees -- ie @skilbjo/monolib/cdk vs @skilbjo/monolib/sdk/ (where I would normally import as import * as cdk from '@skilbjo/monolib/cdk and import * as sdk from @skilbjo/monolib/sdk - is that the point of exports in package.json?

What other advice do you give to move to """modern""" / the-direction-node-is-pointing-towards JS ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions