Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,42 @@ charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
indent_brace_style = K&R
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120
quote_type = double

[*.{bash,sh,zsh}]
indent_style = space
indent_size = 2
# https://gitea.wildfiregames.com/0ad/0ad/commit/038decb12ef05293dd75e5d5e043420545feff79 :
# function_next_line = true
# switch_case_indent = true

[*.{md,mdx}]
trim_trailing_whitespace = false
[{*.Dockerfile,DOCKERFILE}]
indent_size = 4
indent_style = space

[*.html]
insert_final_newline = false

#[*.{json,yml,yaml}]
#indent_size = 2
#indent_style = space

[*.{md,mdx}]
#indent_size = 2
#indent_style = space
# Note: VS Code may not honor the following setting
# See: https://github.com/editorconfig/editorconfig-vscode/issues/153
trim_trailing_whitespace = false

[*.py]
# Note: Undercloud components use PEP8 line length of 79
# Note: for VS Code, set "editor.rulers":[79] in your workspace settings
max_line_length = 79

[*.svg]
insert_final_newline = false

Expand All @@ -31,5 +53,9 @@ indent_size = 4
[CODEOWNERS]
indent_size = 4

[Makefile]
indent_style = tab
indent_size = unset

[package.json]
max_line_length = unset
max_line_length = unset
176 changes: 163 additions & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,16 +1,166 @@
# references
# https://gist.github.com/Voonder/d5f638b60ca8456691dfa1c6412a264e
# https://gist.github.com/pksunkara/988716
# https://github.com/gitattributes/gitattributes/blob/master/Common.gitattributes
# https://github.com/gitattributes/gitattributes/blob/master/.gitattributes
# http://ihopepeace.github.io/gitattributes_generator

# Apply override to all files in the directory
* text=auto eol=lf

# These files are text and should be normalized (Convert crlf => lf)
*.gitattributes text
.gitignore text
*.md text diff=markdown

# Exclude files from exporting
.gitattributes export-ignore
.gitignore export-ignore

# yarn v4 added items
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
# ref: https://github.com/gitattributes/gitattributes/blob/master/Markdown.gitattributes
# editorconfig-checker-disable-next-line because we want it all on one line
*.gitattributes export-ignore text linguist-detectable=true linguist-documentation=false linguist-language=gitattributes
*.gitignore export-ignore text linguist-detectable=true linguist-documentation=false linguist-language=gitignore


# explicitly mark as documentation
# ref: https://github.com/github-linguist/linguist/blob/main/docs/overrides.md#documentation
doc/* linguist-documentation=true
docs/* linguist-documentation=true

*.md text diff=markdown encoding=utf-8 linguist-detectable=true
*.mdx text diff=markdown linguist-detectable=true

# Set the language for these files to json5 to ensure GitHub doesn't show the comments as errors
/.vscode/*.json linguist-language=JSON5

# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
# zero-installs: https://yarnpkg.com/features/caching#zero-installs
# You can also add a .gitattributes file to identify the release and plugin bundles as binary content.
# This way Git won't bother showing massive diffs when each time you subsequently add or update them:
/.yarn/** linguist-vendored
/.yarn/releases/** binary
/.yarn/plugins/** binary linguist-vendored
/.pnp.* binary linguist-generated

# Mark built javascript binaries as generated
# Without this, the repo is marked as >90% javascript, while most code is actually typescript
/packages/*/bin/**/*.js linguist-generated
/packages/*/dist/*.js linguist-generated
/packages/*/lib/*.js linguist-generated

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.epub diff=astextplain
*.EPUB diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.adoc text
*.csv text eol=crlf
*.mustache text
*.sql text
*.tab text
*.tex text diff=tex
*.textile text
*.tsv text
*.txt text encoding=utf-8

# Graphics
*.eps binary
*.gif binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary, use the following line instead.
# *.svg binary
*.tif binary
*.tiff binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.ksh text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.bz binary
*.bz2 binary
*.bzip2 binary
*.gz binary
*.lz binary
*.lzma binary
*.rar binary
*.tar binary
*.taz binary
*.tbz binary
*.tbz2 binary
*.tgz binary
*.tlz binary
*.txz binary
*.xz binary
*.Z binary
*.zip binary
*.zst binary

# Text files where line endings should be preserved
*.patch -text

#########################################################################
### hashicorp/terraform
#########################################################################
# ref: https://github.com/gitattributes/gitattributes/blob/master/community/Hashicorp.gitattributes
# HachiCorp Configuration Language
*.hcl eol=lf

# Terraform
*.tf text eol=lf
*.tf.json text eol=lf
*.tfvars text eol=lf

# Vagrant
Vagrantfile text eol=lf


#########################################################################
### powershell
### explicitly windows files and should use crlf
#########################################################################
# ref: https://github.com/gitattributes/gitattributes/blob/master/PowerShell.gitattributes
*.ps1 text eol=crlf
*.ps1x text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf
*.ps1xml text eol=crlf
*.pssc text eol=crlf
*.psrc text eol=crlf
*.cdxml text eol=crlf


#########################################################################
### Microsoft Shell
### explicitly windows files and should use crlf
#########################################################################
# ref: https://github.com/gitattributes/gitattributes/blob/master/MicrosoftShell.gitattributes
*.msh text eol=crlf
*.msh1 text eol=crlf
*.msh2 text eol=crlf
*.mshxml text eol=crlf
*.msh1xml text eol=crlf
*.msh2xml text eol=crlf
*.mcf text eol=crlf
10 changes: 5 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
node: [18, 19]
node: [24, 26]
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install Node ${{ matrix.node }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore yarn cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Test
run: yarn test
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: var-${{ matrix.node }}
path: var
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,23 @@ name: Publish
on:
release:
types: [ released ]
env:
NODE_VERSION: 18
jobs:
publish:
name: Publish
runs-on: ubuntu-22.04
needs: unit
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node ${{ env.NODE_VERSION }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: ".nvmrc"
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore yarn cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -36,4 +33,4 @@ jobs:
- name: Build
run: yarn build
- name: Publish
run: npm publish
run: npm publish
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

Loading
Loading