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

make css generate a different package-lock.json on master #6967

Closed
lunny opened this issue May 16, 2019 · 1 comment · Fixed by #6969
Closed

make css generate a different package-lock.json on master #6967

lunny opened this issue May 16, 2019 · 1 comment · Fixed by #6969
Labels
topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile

Comments

@lunny
Copy link
Member

lunny commented May 16, 2019

Don't know if this is related with #6952

$ make css
npx lesshint public/less/
npx lessc --clean-css="--s0 -b" public/less/index.less public/css/index.css
npx lessc --clean-css="--s0 -b" public/less/themes/arc-green.less > public/css/theme-arc-green.css;
npx postcss --use autoprefixer --no-map --replace public/css/*

/Volumes/data/Projects/gitea/gitea on  master! ⌚ 20:08:29
$ ls
BSDmakefile       Dockerfile        README.md         contrib           docker            go.sum            main.go           options           routers           templates
CHANGELOG.md      LICENSE           README_ZH.md      coverage.out      docs              indexers          models            package-lock.json scripts           vendor
CONTRIBUTING.md   MAINTAINERS       assets            custom            gitea             integrations      modules           package.json      snap
DCO               Makefile          cmd               data              go.mod            log               node_modules      public            sqlite-log

/Volumes/data/Projects/gitea/gitea on  master! ⌚ 20:08:32
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   package-lock.json

no changes added to commit (use "git add" and/or "git commit -a")
@silverwind
Copy link
Member

silverwind commented May 16, 2019

make css can itself not generate package-lock.json, only npm install can. I think what you're seeing is that you are on a different version of npm which writes a different lockfile.

Generally, I think it's best to actually remove package-lock.json from git, it's purpose is rather questionable in my point of view. Will get a PR up for this later.

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label May 16, 2019
silverwind added a commit to silverwind/gitea that referenced this issue May 16, 2019
Using exact versions in package.json has the same effect as lockfiles
without all the troubles the lockfiles bring (different versions of
package manager generating different lockfiles primarily).

Ensured we only use exact versions in package.json and stopped
generation of new lockfiles via .npmrc which is support by both the npm
and yarn package managers.

Fixes: go-gitea#6967
techknowlogick pushed a commit to zeripath/gitea that referenced this issue May 16, 2019
* remove and disable package-lock

Using exact versions in package.json has the same effect as lockfiles
without all the troubles the lockfiles bring (different versions of
package manager generating different lockfiles primarily).

Ensured we only use exact versions in package.json and stopped
generation of new lockfiles via .npmrc which is support by both the npm
and yarn package managers.

Fixes: go-gitea#6967

* enable save-exact
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this issue Jul 18, 2019
* remove and disable package-lock

Using exact versions in package.json has the same effect as lockfiles
without all the troubles the lockfiles bring (different versions of
package manager generating different lockfiles primarily).

Ensured we only use exact versions in package.json and stopped
generation of new lockfiles via .npmrc which is support by both the npm
and yarn package managers.

Fixes: go-gitea#6967

* enable save-exact
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants