Merge pull request #76 from DeterminateSystems/general-cleanup

General JS cleanup
This commit is contained in:
Luc Perkins 2024-05-02 13:09:27 -03:00 committed by GitHub
commit f69dd1d935
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 2205 additions and 2640 deletions

View file

@ -33,7 +33,7 @@
"@typescript-eslint/array-type": "error", "@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error", "@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error", "@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off", "camelcase": "error",
"@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [ "@typescript-eslint/explicit-function-return-type": [
"error", "error",

View file

@ -14,10 +14,20 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main - uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix develop --command pnpm install - name: pnpm install
- run: nix develop --command pnpm run all run: nix develop --command pnpm install
- run: git status --porcelain=v1 - name: prettier format
- run: test $(git status --porcelain=v1 2>/dev/null | wc -l) -eq 0 run: nix develop --command pnpm run check-fmt
- name: ESLint
run: nix develop --command pnpm run lint
- name: tsup build
run: nix develop --command pnpm run build
- name: ncc package
run: nix develop --command pnpm run package
- name: Git status
run: git status --porcelain=v1
- name: Ensure no staged changes
run: git diff --exit-code
run-test-suite: run-test-suite:
name: Run test suite name: Run test suite
strategy: strategy:

2974
dist/index.js generated vendored

File diff suppressed because it is too large Load diff

674
dist/main.js generated vendored

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,14 @@
{ {
"name": "nix-installer-action", "name": "nix-installer-action",
"version": "1.0.0", "version": "1.0.0",
"description": "You can use [`nix-installer`](https://github.com/DeterminateSystems/nix-installer) as a Github action:", "description": "You can use [`nix-installer`](https://github.com/DeterminateSystems/nix-installer) as a Github Action:",
"main": "./dist/main.js", "main": "./dist/main.js",
"types": "./dist/main.d.ts", "types": "./dist/main.d.ts",
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"format": "prettier --write .", "format": "prettier --write .",
"check-fmt": "prettier --check .",
"lint": "eslint src/**/*.ts", "lint": "eslint src/**/*.ts",
"package": "ncc build", "package": "ncc build",
"all": "pnpm run format && pnpm run lint && pnpm run build && pnpm run package" "all": "pnpm run format && pnpm run lint && pnpm run build && pnpm run package"
@ -27,16 +28,14 @@
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1", "@actions/github": "^5.1.1",
"@actions/tool-cache": "^2.0.1",
"detsys-ts": "github:DeterminateSystems/detsys-ts", "detsys-ts": "github:DeterminateSystems/detsys-ts",
"fetch-retry": "^5.0.6",
"string-argv": "^0.3.2" "string-argv": "^0.3.2"
}, },
"devDependencies": { "devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0", "@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.12.7", "@types/node": "^20.12.8",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.6.0", "@typescript-eslint/eslint-plugin": "^7.8.0",
"@vercel/ncc": "^0.38.1", "@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-typescript": "^3.6.1",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff