Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Apr 24, 2024
1 parent a19d2bb commit 85090d3
Show file tree
Hide file tree
Showing 15 changed files with 3,835 additions and 129 deletions.
5 changes: 3 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ cpu.out
*.db
*.log

node_modules
.venv

/gitea
/gitea-vet
/debug
Expand All @@ -70,7 +73,6 @@ cpu.out
/tests/e2e/test-artifacts
/tests/e2e/test-snapshots
/tests/*.ini
/node_modules
/yarn.lock
/yarn-error.log
/npm-debug.log*
Expand All @@ -79,7 +81,6 @@ cpu.out
/public/assets/fonts
/public/assets/img/avatar
/vendor
/web_src/fomantic/node_modules
/web_src/fomantic/build/*
!/web_src/fomantic/build/semantic.js
!/web_src/fomantic/build/semantic.css
Expand Down
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ modifies/dependencies:
- any-glob-to-any-file:
- "package.json"
- "package-lock.json"
- "tools/package.json"
- "tools/package-lock.json"
- "pyproject.toml"
- "poetry.lock"
- "go.mod"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/files-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
- "Makefile"
templates:
- "tools/package-lock.json"
- "tools/lint-templates-*.js"
- "templates/**/*.tmpl"
- "pyproject.toml"
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: pip install poetry
- run: make deps-py
- run: make deps-frontend
Expand Down Expand Up @@ -68,7 +70,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: make deps-frontend
- run: make lint-swagger

Expand Down Expand Up @@ -139,7 +143,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: make deps-frontend
- run: make lint-frontend
- run: make checks-frontend
Expand Down Expand Up @@ -188,7 +194,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: make deps-frontend
- run: make lint-md
- run: make docs
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pull-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: make deps-frontend frontend deps-backend
- run: npx playwright install --with-deps
- run: make test-e2e-sqlite
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: make deps-frontend deps-backend
# xgo build
- run: make release
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-tag-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: make deps-frontend deps-backend
# xgo build
- run: make release
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: |
package-lock.json
tools/package-lock.json
- run: make deps-frontend deps-backend
# xgo build
- run: make release
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ cpu.out
*.log
*.log.*.gz

node_modules
.venv

/gitea
/gitea-vet
/debug
Expand All @@ -68,8 +71,6 @@ cpu.out
/tests/e2e/test-snapshots
/tests/*.ini
/tests/**/*.git/**/*.sample
/node_modules
/.venv
/yarn.lock
/yarn-error.log
/npm-debug.log*
Expand All @@ -78,7 +79,6 @@ cpu.out
/public/assets/fonts
/public/assets/licenses.txt
/vendor
/web_src/fomantic/node_modules
/web_src/fomantic/build/*
!/web_src/fomantic/build/semantic.js
!/web_src/fomantic/build/semantic.css
Expand Down
30 changes: 21 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags

TEST_TAGS ?= sqlite sqlite_unlock_notify

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)
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)

GO_DIRS := build cmd models modules routers services tests
WEB_DIRS := web_src/js web_src/css
Expand Down Expand Up @@ -278,7 +278,7 @@ node-check:

.PHONY: clean-all
clean-all: clean
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules tools/node_modules

.PHONY: clean
clean:
Expand Down Expand Up @@ -433,7 +433,7 @@ lint-actions:
$(GO) run $(ACTIONLINT_PACKAGE)

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

Expand Down Expand Up @@ -869,6 +869,10 @@ node_modules: package-lock.json
npm install --no-save
@touch node_modules

tools/node_modules: tools/package-lock.json
cd tools && npm install --no-save
@touch tools/node_modules

.venv: poetry.lock
poetry install --no-root
@touch .venv
Expand All @@ -878,10 +882,11 @@ update: update-js update-py

.PHONY: update-js
update-js: node-check | node_modules
npx updates -u -f package.json
rm -rf node_modules package-lock.json
npx updates -u -f package.json tools/package.json
rm -rf node_modules package-lock.json tools/package-lock.json
npm install --package-lock
@touch node_modules
cd tools && npm install --package-lock
@touch node_modules tools/node_modules

.PHONY: update-py
update-py: node-check | node_modules
Expand Down Expand Up @@ -913,7 +918,7 @@ $(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json
@touch $(WEBPACK_DEST)

.PHONY: svg
svg: node-check | node_modules
svg: node-check tools/node_modules
rm -rf $(SVG_DEST_DIR)
node tools/generate-svg.js

Expand All @@ -937,6 +942,14 @@ lockfile-check:
echo "$${diff}"; \
exit 1; \
fi
cd tools && npm install --package-lock-only
@diff=$$(git diff --color=always tools/package-lock.json); \
if [ -n "$$diff" ]; then \
echo "tools/package-lock.json is inconsistent with package.json"; \
echo "Please run 'npm install --package-lock-only' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi

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

.PHONY: generate-images
generate-images: | node_modules
npm install --no-save fabric@6.0.0-beta20 imagemin-zopfli@7
generate-images: tools/node_modules
node tools/generate-images.js $(TAGS)

.PHONY: generate-manpage
Expand Down
105 changes: 0 additions & 105 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"stylelint-declaration-block-no-ignored-properties": "2.8.0",
"stylelint-declaration-strict-value": "1.10.4",
"stylelint-value-no-unknown-custom-properties": "6.0.1",
"svgo": "3.2.0",
"updates": "16.0.1",
"vite-string-plugin": "1.1.5",
"vitest": "1.5.0"
Expand Down

0 comments on commit 85090d3

Please sign in to comment.