-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
120 lines (120 loc) · 4.41 KB
/
Copy pathpackage.json
File metadata and controls
120 lines (120 loc) · 4.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"name": "backdrop",
"private": true,
"version": "1.7.2",
"homepage": "https://github.com/aensley/backdrop#readme",
"bugs": {
"url": "https://github.com/aensley/backdrop/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/aensley/backdrop.git"
},
"license": "MIT",
"scripts": {
"commit": "czg",
"test": "npm run test:sh && npm run test:ps",
"test:sh": "shellcheck src/backdrop.sh src/install.sh test/backdrop.bats && bats test/",
"test:ps": "pwsh -Command \"\\$result = Invoke-Pester test/backdrop.tests.ps1 -Output Detailed -PassThru; if (\\$result.FailedCount -gt 0) { exit 1 }\"",
"lint": "npm run lint:sh && npm run lint:ps",
"lint:sh": "prettier --check . && ~/go/bin/shfmt -d -i 2 -ci src/backdrop.sh src/install.sh test/backdrop.bats",
"lint:ps": "pwsh -Command \"\\$exclude = @('PSAvoidUsingWriteHost', 'PSUseShouldProcessForStateChangingFunctions'); \\$results = 'src/backdrop.psm1', 'src/install.ps1' | ForEach-Object { Invoke-ScriptAnalyzer -Path \\$_ -Severity @('Error', 'Warning') -ExcludeRule \\$exclude }; if (\\$results) { \\$results | Format-Table RuleName, Severity, Line, Message -AutoSize; exit 1 }\"",
"lint:fix": "npm run lint:sh:fix && npm run lint:ps:fix",
"lint:sh:fix": "prettier --write . && ~/go/bin/shfmt -w -i 2 -ci src/backdrop.sh src/install.sh test/backdrop.bats",
"lint:ps:fix": "pwsh -Command \"\\$exclude = @('PSAvoidUsingWriteHost', 'PSUseShouldProcessForStateChangingFunctions'); 'src/backdrop.psm1', 'src/install.ps1' | ForEach-Object { Invoke-ScriptAnalyzer -Path \\$_ -Severity @('Error', 'Warning') -ExcludeRule \\$exclude -Fix }\"",
"install:ps": "pwsh -Command \"Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -Force -ErrorAction Stop; Install-Module -Name Pester -Scope CurrentUser -Force -MinimumVersion 5.0 -ErrorAction Stop\"",
"prepare": "npx simple-git-hooks",
"update": "npx npm-check-updates -u && npm update"
},
"devDependencies": {
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/exec": "^7.1.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^12.0.8",
"@semantic-release/npm": "^13.1.5",
"@semantic-release/release-notes-generator": "^14.1.1",
"bats": "^1.13.0",
"conventional-changelog-conventionalcommits": "^10.2.0",
"czg": "^1.13.1",
"prettier": "^3.9.3",
"semantic-release": "^25.0.5",
"simple-git-hooks": "^2.13.1"
},
"allowScripts": {
"simple-git-hooks@2.13.1": true
},
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "sed -i 's/^VERSION=.*/VERSION=\"${nextRelease.version}\"/' src/backdrop.sh && sed -i 's/^\\$script:Version[[:space:]]*=.*/\\$script:Version = '\"'\"'${nextRelease.version}'\"'\"'/' src/backdrop.psm1 && sed -i 's/ModuleVersion[[:space:]]*=.*/ModuleVersion = '\"'\"'${nextRelease.version}'\"'\"'/' src/backdrop.psd1"
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json",
"src/backdrop.sh",
"src/backdrop.psm1",
"src/backdrop.psd1"
]
}
],
"@semantic-release/github"
]
},
"prettier": {
"tabWidth": 2,
"printWidth": 120,
"useTabs": false,
"endOfLine": "lf",
"trailingComma": "none",
"semi": false,
"singleQuote": true,
"arrowParens": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"vueIndentScriptAndStyle": false
},
"config": {
"commitizen": {
"path": "node_modules/cz-git",
"type": "conventional",
"useEmoji": true
}
},
"simple-git-hooks": {
"pre-commit": "npm run lint && npm run test",
"prepare-commit-msg": "exec < /dev/tty && node_modules/.bin/czg --hook \"$1\" \"$2\" || true"
}
}