plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
478 stars 648 forks source link

'make clean' removes checked in files from the repo #6401

Closed fredvd closed 4 weeks ago

fredvd commented 1 month ago

running make clean in a clean checkout, then git status:

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/@plone/volto/src/LanguageSwitcher.jsx
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/@plone/volto/src/TSComponent.tsx
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/@plone/volto/src/client.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/@plone/volto/src/routes.jsx
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/@plone/volto/src/server.jsx
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-addon/index.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-addon/package.json
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-dummy/index.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-dummy/package.json
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/package.json
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/razzle.extend.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/src/customizations/@root/marker.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/src/customizations/LanguageSwitcher.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/src/customizations/TSComponent.jsx
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/src/customizations/client.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/src/customizations/routes.tsx
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-source-addon/src/index.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-unmentioned/index.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-unmentioned/package.json
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-via-addons-env-var/index.js
    deleted:    packages/volto/__tests__/fixtures/test-volto-project/node_modules/test-released-via-addons-env-var/package.json
sneridagh commented 4 weeks ago

@fredvd and these are legit, indeed.

fredvd commented 4 weeks ago

Tested locally with the branch: the files are now kept.

When running make, it still shows warnings that it cannot find node_modules with the find, which is strange and exits with an error code . Running make clean a second time and the clean finishes ok.

Another thing while testing the issue with make clean. When I do a clean checkout from the the plone/volto repo and do a make install, is it normal that the pnpm-lock.yaml be changed right away compared to git? I updated to the latest pnpm . AFAIK KGS is KGS, or can this happen anytime with pnpm that is finds newer minor versions within the ranges specified for packages?

Studio1:volto fred$ make clean
find: ./packages/blocks/node_modules: No such file or directory
find: ./packages/generator-volto/node_modules: No such file or directory
find: ./packages/types/node_modules: No such file or directory
find: ./packages/volto-slate/node_modules: No such file or directory
find: ./packages/coresandbox/node_modules: No such file or directory
find: ./packages/providers/node_modules: No such file or directory
find: ./packages/volto-testing/node_modules: No such file or directory
find: ./packages/volto/node_modules: No such file or directory
find: ./packages/components/node_modules: No such file or directory
find: ./packages/scripts/node_modules: No such file or directory
find: ./packages/registry/node_modules: No such file or directory
find: ./packages/slots/node_modules: No such file or directory
find: ./packages/client/node_modules: No such file or directory
find: ./packages/helpers/node_modules: No such file or directory
make: *** [clean] Error 1
Studio1:volto fred$ make clean

pnpm-lock.yaml changes:

git-diff-output.log