Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(custom-setup): introduce custom npm registries #542

Merged
merged 22 commits into from
Aug 11, 2022

Conversation

danilowoz
Copy link
Member

@danilowoz danilowoz commented Jul 26, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code

Documentation preview: https://1gemwv-3000.preview.csb.app/guides/private-packages
Screenshot 2022-07-26 at 15 56 58

@danilowoz danilowoz marked this pull request as draft July 26, 2022 12:45
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 26, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ea06516:

Sandbox Source
Sandpack Configuration

@github-actions
Copy link

github-actions bot commented Jul 26, 2022

Size changes

sandpack-react

Total base (gzip) Total current (gzip) +/-
174 kb 174 kb ⚠️ +62 bytes (+0.03%)
Details
Dependency name / file Base Current +/-
0 522 kb 522 kb ✅ 0 byte
main 518 kb 518 kb ⚠️ +134 bytes (+0.03%)
@codesandbox/sandpack-react 63 kb 63 kb ⚠️ +134 bytes (+0.21%)
@code-hike/classer 1 kb 1 kb ✅ 0 byte
@codesandbox/sandpack-client 8 kb 8 kb ✅ 0 byte
@stitches/core 16 kb 16 kb ✅ 0 byte
@codemirror/state 35 kb 35 kb ✅ 0 byte
@codemirror/view 167 kb 167 kb ✅ 0 byte
@codemirror/closebrackets 6 kb 6 kb ✅ 0 byte
@codemirror/matchbrackets 4 kb 4 kb ✅ 0 byte
@codemirror/commands 24 kb 24 kb ✅ 0 byte
@codemirror/comment 5 kb 5 kb ✅ 0 byte
@codemirror/gutter 10 kb 10 kb ✅ 0 byte
@codemirror/highlight 12 kb 12 kb ✅ 0 byte
@codemirror/history 9 kb 9 kb ✅ 0 byte
@react-hook/intersection-observer 2 kb 2 kb ✅ 0 byte
@codemirror/lang-css 11 kb 11 kb ✅ 0 byte
@codemirror/lang-javascript 6 kb 6 kb ✅ 0 byte
@codemirror/lang-html 15 kb 15 kb ✅ 0 byte
@codemirror/lang-markdown 9 kb 9 kb ✅ 0 byte
@codemirror/text 13 kb 13 kb ✅ 0 byte
style-mod 3 kb 3 kb ✅ 0 byte
@codemirror/rangeset 16 kb 16 kb ✅ 0 byte
w3c-keyname 2 kb 2 kb ✅ 0 byte
@lezer/common 34 kb 34 kb ✅ 0 byte
@codemirror/language 19 kb 19 kb ✅ 0 byte
@react-hook/passive-layout-effect 191 bytes 191 bytes ✅ 0 byte
@lezer/css 9 kb 9 kb ✅ 0 byte
@lezer/html 12 kb 12 kb ✅ 0 byte
@lezer/javascript 54 kb 54 kb ✅ 0 byte
@codemirror/autocomplete 34 kb 34 kb ✅ 0 byte
@lezer/markdown 42 kb 42 kb ✅ 0 byte
@lezer/lr 31 kb 31 kb ✅ 0 byte
@codemirror/tooltip 14 kb 14 kb ✅ 0 byte
lodash.isequal 18 kb 18 kb ✅ 0 byte
lz-string 9 kb 9 kb ✅ 0 byte
react-devtools-inline 823 kb 823 kb ✅ 0 byte
codesandbox-import-utils 3 kb 3 kb ✅ 0 byte
package-build-stats 487 bytes 487 bytes ✅ 0 byte
intersection-observer 13 kb 13 kb ✅ 0 byte
react-is 2 kb 2 kb ✅ 0 byte

sandpack-client

Total base (gzip) Total current (gzip) +/-
7 kb 7 kb ⚠️ +17 bytes (+0.24%)
Details
Dependency name / file Base Current +/-
main 20 kb 20 kb ⚠️ +53 bytes (+0.26%)
@codesandbox/sandpack-client 8 kb 8 kb ⚠️ +53 bytes (+0.63%)
codesandbox-import-utils 3 kb 3 kb ✅ 0 byte
lodash.isequal 18 kb 18 kb ✅ 0 byte
package-build-stats 487 bytes 487 bytes ✅ 0 byte

@danilowoz danilowoz requested review from DeMoorJasper and alexnm July 27, 2022 08:41
@@ -0,0 +1 @@
test:{SHA}qUqP5cyxm6YcTAhz05Hph5gvu9M=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment mentioning this is only a test user with password test

Currently, Sandpack doesn’t have a way to consume private dependencies from any kind of registry service, because the bundler host is shared with all Sandpack consumers apps. However, you can pass local dependencies just like a regular file or using the external resource API:
Read the following [guide](/guides/private-packages).

#### How to load local dependencies?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESModules might also be a solution for local dependencies, as we support importing files as a full url. although it never really took of in codesandbox itself, don't even think we ever even announced that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

humm good to know. I think I'm going to work on local dependencies in another PR, where we could explore how Verdaccio can also help in this regard.

@danilowoz danilowoz marked this pull request as ready for review July 27, 2022 09:15
@danilowoz danilowoz requested a review from codebryo July 27, 2022 09:16
@danilowoz danilowoz requested a review from tromika August 1, 2022 11:54
Copy link
Contributor

@codebryo codebryo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added my suggestion for documentation changes.

@danilowoz danilowoz merged commit 1fd8b99 into main Aug 11, 2022
@danilowoz danilowoz deleted the draft/goofy-leftpad branch August 11, 2022 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants