aws / language-servers

AWS related Language Servers
Apache License 2.0
23 stars 18 forks source link

Add script to enable bundleDependencies in monorepo workspaces #283

Closed rtarcr closed 3 months ago

rtarcr commented 4 months ago

Problem

We want to publish JSON and YAML LSP servers to NPM. They depend on the core subpackage in the monorepo and to avoid publishing it we need to include the dependency in the published package.

This is currently not possible due to https://github.com/npm/cli/issues/3466

Solution

Create script that:

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

rahmaniaam commented 4 months ago

Looks good! Does the @aws/lsp-core package live on inside root/node_modules/@aws/aws-lsp-yaml/node_modules after installing or will there be a root/node_modules/@aws/lsp-core in wherever the package is installed? I imagine it's the former so it's exclusively used only by aws-lsp-yaml

rtarcr commented 4 months ago

Looks good! Does the @aws/lsp-core package live on inside root/node_modules/@aws/aws-lsp-yaml/node_modules after installing or will there be a root/node_modules/@aws/lsp-core in wherever the package is installed? I imagine it's the former so it's exclusively used only by aws-lsp-yaml

Good question. Not sure what is the behavior tbh, but I believe it should not matter in the scope of these changes

rtarcr commented 3 months ago

Closing this due to dependencies of bundled dependencies not getting installed automatically, which require more custom scripts for this solution