conversionxl / aybolit

Lightweight web components library built with LitElement.
https://conversionxl.github.io/aybolit/
MIT License
7 stars 8 forks source link

All @vaadin is devDeps? #250

Closed lkraav closed 1 year ago

lkraav commented 1 year ago

Since we build our own bundles, and app never uses components directly, I think we could save a bunch of resources in cxl/wp-theme-lib npm [c]i execution, where it doesn't have to pull in all Vaadin ecosystem anymore.

https://docs.npmjs.com/cli/v9/commands/npm-ci#omit also says

omit Default: 'dev' if the NODE_ENV environment variable is set to 'production', otherwise empty. Type: "dev", "optional", or "peer" (can be set multiple times)

Dependency types to omit from the installation tree on disk. Note that these dependencies are still resolved and added to the package-lock.json or npm-shrinkwrap.json file. They are just not physically installed on disk.

Which sounds exactly what we want.

Thoughts @conversionxl/web?

pawelkmpt commented 1 year ago

@lkraav can you elaborate what did you exactly do achieve changes in fd695e93c11a2d1f7a5f760c7752229ad6aaee0a?

I have an issue with wp-theme-lib not installing cxl-lumo-styles and I don't know whether I made a mistake in aybolit or this commit affects npm i and npm up behavior.

lkraav commented 1 year ago

can you elaborate what did you exactly do achieve changes in fd695e93c11a2d1f7a5f760c7752229ad6aaee0a?

There is no such commit?

I have an issue with wp-theme-lib not installing cxl-lumo-styles

In wp-theme-lib directory, npm i and npm ci both should install node_modules/@conversionxl/cxl-{lumo-styles,ui}/ just fine.

pawelkmpt commented 1 year ago

There is no such commit?

https://github.com/conversionxl/wp-theme-lib/commit/fd695e93c11a2d1f7a5f760c7752229ad6aaee0a

In wp-theme-lib directory, npm i and npm ci both should install node_modules/@conversionxl/cxl-{lumo-styles,ui}/ just fine.

So it might be something not correct with my recent aybolit commits.

lkraav commented 1 year ago

So it might be something not correct with my recent aybolit commits.

You've only made a couple commits, I don't see anything wrong there.

lkraav commented 1 year ago

Proof it works as-is


leho@papaya Documents $ [-] git clone git@github.com:conversionxl/wp-theme-lib.git wp-theme-lib.git
Cloning into 'wp-theme-lib.git'...
remote: Enumerating objects: 1474, done.
remote: Counting objects: 100% (542/542), done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 1474 (delta 421), reused 462 (delta 378), pack-reused 932
Receiving objects: 100% (1474/1474), 1.84 MiB | 1.88 MiB/s, done.
Resolving deltas: 100% (777/777), done.

leho@papaya Documents $ [-] cd wp-theme-lib.git/

leho@papaya wp-theme-lib.git $ [git:master] ls -la
total 688
drwxr-xr-x 1 leho leho    466 30. jaan  16:56 .
drwx--x--x 1 leho leho  26528 30. jaan  16:56 ..
-rw-r--r-- 1 leho leho     67 30. jaan  16:56 commitlint.config.js
-rw-r--r-- 1 leho leho   1368 30. jaan  16:56 composer.json
-rw-r--r-- 1 leho leho    254 30. jaan  16:56 .editorconfig
-rw-r--r-- 1 leho leho    262 30. jaan  16:56 .eslintrc.js
drwxr-xr-x 1 leho leho    122 30. jaan  16:56 .git
drwxr-xr-x 1 leho leho     18 30. jaan  16:56 .github
-rw-r--r-- 1 leho leho     69 30. jaan  16:56 .gitignore
-rw-r--r-- 1 leho leho     78 30. jaan  16:56 husky.config.js
drwxr-xr-x 1 leho leho     30 30. jaan  16:56 js
-rw-r--r-- 1 leho leho     58 30. jaan  16:56 LICENSE
-rw-r--r-- 1 leho leho     62 30. jaan  16:56 lint-staged.config.js
-rw-r--r-- 1 leho leho     42 30. jaan  16:56 .npmrc
-rw-r--r-- 1 leho leho    771 30. jaan  16:56 package.json
-rw-r--r-- 1 leho leho 638990 30. jaan  16:56 package-lock.json
-rw-r--r-- 1 leho leho    368 30. jaan  16:56 phpcs.xml
-rw-r--r-- 1 leho leho     77 30. jaan  16:56 .prettierrc.js
-rw-r--r-- 1 leho leho    905 30. jaan  16:56 psalm.xml
-rw-r--r-- 1 leho leho     58 30. jaan  16:56 README.md
drwxr-xr-x 1 leho leho     40 30. jaan  16:56 scss
drwxr-xr-x 1 leho leho    290 30. jaan  16:56 src
-rw-r--r-- 1 leho leho     36 30. jaan  16:56 .stylelintrc.json
drwxr-xr-x 1 leho leho     36 30. jaan  16:56 templates

leho@papaya wp-theme-lib.git $ [git:master] npm i
npm WARN skipping integrity check for git dependency ssh://git@github.com/lkraav/stylelint-crdy.git 
npm WARN deprecated @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)

added 720 packages, and audited 721 packages in 11s

75 packages are looking for funding
  run `npm fund` for details

25 vulnerabilities (3 low, 4 moderate, 17 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

leho@papaya wp-theme-lib.git $ [git:master] ls -l node_modules/@conversionxl/
total 0
drwxr-xr-x 1 leho leho  76 30. jaan  16:56 cxl-lumo-styles
drwxr-xr-x 1 leho leho  88 30. jaan  16:56 cxl-ui
drwxr-xr-x 1 leho leho 286 30. jaan  16:56 lint-staged-config
drwxr-xr-x 1 leho leho  82 30. jaan  16:56 purecss

leho@papaya wp-theme-lib.git $ [git:master]
lkraav commented 1 year ago

But I also see develop branch removes cxl-lumo-styles, investigating.