Skip to content

Commit 85090d3

Browse files
committed
wip
1 parent a19d2bb commit 85090d3

15 files changed

+3835
-129
lines changed

.dockerignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ cpu.out
4848
*.db
4949
*.log
5050

51+
node_modules
52+
.venv
53+
5154
/gitea
5255
/gitea-vet
5356
/debug
@@ -70,7 +73,6 @@ cpu.out
7073
/tests/e2e/test-artifacts
7174
/tests/e2e/test-snapshots
7275
/tests/*.ini
73-
/node_modules
7476
/yarn.lock
7577
/yarn-error.log
7678
/npm-debug.log*
@@ -79,7 +81,6 @@ cpu.out
7981
/public/assets/fonts
8082
/public/assets/img/avatar
8183
/vendor
82-
/web_src/fomantic/node_modules
8384
/web_src/fomantic/build/*
8485
!/web_src/fomantic/build/semantic.js
8586
!/web_src/fomantic/build/semantic.css

.github/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ modifies/dependencies:
6060
- any-glob-to-any-file:
6161
- "package.json"
6262
- "package-lock.json"
63+
- "tools/package.json"
64+
- "tools/package-lock.json"
6365
- "pyproject.toml"
6466
- "poetry.lock"
6567
- "go.mod"

.github/workflows/files-changed.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
- "Makefile"
7474
7575
templates:
76+
- "tools/package-lock.json"
7677
- "tools/lint-templates-*.js"
7778
- "templates/**/*.tmpl"
7879
- "pyproject.toml"

.github/workflows/pull-compliance.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
with:
4040
node-version: 20
4141
cache: npm
42-
cache-dependency-path: package-lock.json
42+
cache-dependency-path: |
43+
package-lock.json
44+
tools/package-lock.json
4345
- run: pip install poetry
4446
- run: make deps-py
4547
- run: make deps-frontend
@@ -68,7 +70,9 @@ jobs:
6870
with:
6971
node-version: 20
7072
cache: npm
71-
cache-dependency-path: package-lock.json
73+
cache-dependency-path: |
74+
package-lock.json
75+
tools/package-lock.json
7276
- run: make deps-frontend
7377
- run: make lint-swagger
7478

@@ -139,7 +143,9 @@ jobs:
139143
with:
140144
node-version: 20
141145
cache: npm
142-
cache-dependency-path: package-lock.json
146+
cache-dependency-path: |
147+
package-lock.json
148+
tools/package-lock.json
143149
- run: make deps-frontend
144150
- run: make lint-frontend
145151
- run: make checks-frontend
@@ -188,7 +194,9 @@ jobs:
188194
with:
189195
node-version: 20
190196
cache: npm
191-
cache-dependency-path: package-lock.json
197+
cache-dependency-path: |
198+
package-lock.json
199+
tools/package-lock.json
192200
- run: make deps-frontend
193201
- run: make lint-md
194202
- run: make docs

.github/workflows/pull-e2e-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
with:
2626
node-version: 20
2727
cache: npm
28-
cache-dependency-path: package-lock.json
28+
cache-dependency-path: |
29+
package-lock.json
30+
tools/package-lock.json
2931
- run: make deps-frontend frontend deps-backend
3032
- run: npx playwright install --with-deps
3133
- run: make test-e2e-sqlite

.github/workflows/release-nightly.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
with:
2727
node-version: 20
2828
cache: npm
29-
cache-dependency-path: package-lock.json
29+
cache-dependency-path: |
30+
package-lock.json
31+
tools/package-lock.json
3032
- run: make deps-frontend deps-backend
3133
# xgo build
3234
- run: make release

.github/workflows/release-tag-rc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
with:
2626
node-version: 20
2727
cache: npm
28-
cache-dependency-path: package-lock.json
28+
cache-dependency-path: |
29+
package-lock.json
30+
tools/package-lock.json
2931
- run: make deps-frontend deps-backend
3032
# xgo build
3133
- run: make release

.github/workflows/release-tag-version.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
with:
2828
node-version: 20
2929
cache: npm
30-
cache-dependency-path: package-lock.json
30+
cache-dependency-path: |
31+
package-lock.json
32+
tools/package-lock.json
3133
- run: make deps-frontend deps-backend
3234
# xgo build
3335
- run: make release

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ cpu.out
4646
*.log
4747
*.log.*.gz
4848

49+
node_modules
50+
.venv
51+
4952
/gitea
5053
/gitea-vet
5154
/debug
@@ -68,8 +71,6 @@ cpu.out
6871
/tests/e2e/test-snapshots
6972
/tests/*.ini
7073
/tests/**/*.git/**/*.sample
71-
/node_modules
72-
/.venv
7374
/yarn.lock
7475
/yarn-error.log
7576
/npm-debug.log*
@@ -78,7 +79,6 @@ cpu.out
7879
/public/assets/fonts
7980
/public/assets/licenses.txt
8081
/vendor
81-
/web_src/fomantic/node_modules
8282
/web_src/fomantic/build/*
8383
!/web_src/fomantic/build/semantic.js
8484
!/web_src/fomantic/build/semantic.css

Makefile

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
138138

139139
TEST_TAGS ?= sqlite sqlite_unlock_notify
140140

141-
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
141+
TAR_EXCLUDES := $(EXECUTABLE) .git data indexers queues log node_modules tools/node_modules $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
142142

143143
GO_DIRS := build cmd models modules routers services tests
144144
WEB_DIRS := web_src/js web_src/css
@@ -278,7 +278,7 @@ node-check:
278278

279279
.PHONY: clean-all
280280
clean-all: clean
281-
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
281+
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules tools/node_modules
282282

283283
.PHONY: clean
284284
clean:
@@ -433,7 +433,7 @@ lint-actions:
433433
$(GO) run $(ACTIONLINT_PACKAGE)
434434

435435
.PHONY: lint-templates
436-
lint-templates: .venv node_modules
436+
lint-templates: .venv tools/node_modules
437437
@node tools/lint-templates-svg.js
438438
@poetry run djlint $(shell find templates -type f -iname '*.tmpl')
439439

@@ -869,6 +869,10 @@ node_modules: package-lock.json
869869
npm install --no-save
870870
@touch node_modules
871871

872+
tools/node_modules: tools/package-lock.json
873+
cd tools && npm install --no-save
874+
@touch tools/node_modules
875+
872876
.venv: poetry.lock
873877
poetry install --no-root
874878
@touch .venv
@@ -878,10 +882,11 @@ update: update-js update-py
878882

879883
.PHONY: update-js
880884
update-js: node-check | node_modules
881-
npx updates -u -f package.json
882-
rm -rf node_modules package-lock.json
885+
npx updates -u -f package.json tools/package.json
886+
rm -rf node_modules package-lock.json tools/package-lock.json
883887
npm install --package-lock
884-
@touch node_modules
888+
cd tools && npm install --package-lock
889+
@touch node_modules tools/node_modules
885890

886891
.PHONY: update-py
887892
update-py: node-check | node_modules
@@ -913,7 +918,7 @@ $(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json
913918
@touch $(WEBPACK_DEST)
914919

915920
.PHONY: svg
916-
svg: node-check | node_modules
921+
svg: node-check tools/node_modules
917922
rm -rf $(SVG_DEST_DIR)
918923
node tools/generate-svg.js
919924

@@ -937,6 +942,14 @@ lockfile-check:
937942
echo "$${diff}"; \
938943
exit 1; \
939944
fi
945+
cd tools && npm install --package-lock-only
946+
@diff=$$(git diff --color=always tools/package-lock.json); \
947+
if [ -n "$$diff" ]; then \
948+
echo "tools/package-lock.json is inconsistent with package.json"; \
949+
echo "Please run 'npm install --package-lock-only' and commit the result:"; \
950+
echo "$${diff}"; \
951+
exit 1; \
952+
fi
940953

941954
.PHONY: update-translations
942955
update-translations:
@@ -957,8 +970,7 @@ generate-gitignore:
957970
$(GO) run build/generate-gitignores.go
958971

959972
.PHONY: generate-images
960-
generate-images: | node_modules
961-
npm install --no-save [email protected] imagemin-zopfli@7
973+
generate-images: tools/node_modules
962974
node tools/generate-images.js $(TAGS)
963975

964976
.PHONY: generate-manpage

package-lock.json

Lines changed: 0 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
"stylelint-declaration-block-no-ignored-properties": "2.8.0",
9292
"stylelint-declaration-strict-value": "1.10.4",
9393
"stylelint-value-no-unknown-custom-properties": "6.0.1",
94-
"svgo": "3.2.0",
9594
"updates": "16.0.1",
9695
"vite-string-plugin": "1.1.5",
9796
"vitest": "1.5.0"

0 commit comments

Comments
 (0)