@stacksjs/defaults 0.75.44 → 0.75.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ide/vscode/package.json +9 -7
- package/ide/vscode/scripts/stx-contributes.ts +12 -3
- package/ide/vscode/tests/manifest.test.ts +14 -1
- package/package.json +2 -2
- package/resources/components/Dashboard/Content/BlogDashboard.stx +4 -1
- package/vcs/github/workflows/buddy-bot.yml +2 -2
- package/vcs/github/workflows/ci.yml +3 -3
- package/vcs/github/workflows/release.yml +1 -1
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.46",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
@@ -140,8 +140,9 @@
|
|
|
140
140
|
"category": "stx"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
|
-
"command": "
|
|
144
|
-
"title": "
|
|
143
|
+
"command": "stx.reloadUtilityClasses",
|
|
144
|
+
"title": "Reload Utility Class Configuration",
|
|
145
|
+
"category": "stx"
|
|
145
146
|
}
|
|
146
147
|
],
|
|
147
148
|
"menus": {
|
|
@@ -257,7 +258,7 @@
|
|
|
257
258
|
"stxTypescriptPlugin.enabled": {
|
|
258
259
|
"type": "boolean",
|
|
259
260
|
"default": true,
|
|
260
|
-
"description": "
|
|
261
|
+
"description": "Type-check the TypeScript in stx files (script blocks and template expressions) with the TypeScript server, and offer its hovers, completions and go to definition there"
|
|
261
262
|
},
|
|
262
263
|
"stx.diagnostics.enable": {
|
|
263
264
|
"type": "boolean",
|
|
@@ -364,10 +365,11 @@
|
|
|
364
365
|
"default": true,
|
|
365
366
|
"description": "Enable autocomplete for utility classes"
|
|
366
367
|
},
|
|
367
|
-
"
|
|
368
|
+
"stx.utilityClasses.remToPxRatio": {
|
|
368
369
|
"type": "number",
|
|
369
370
|
"default": 16,
|
|
370
|
-
"
|
|
371
|
+
"minimum": 0,
|
|
372
|
+
"markdownDescription": "Pixels per `rem` for the px values utility-class hovers show next to `rem` values. `0` hides them. Replaces `css.remToPxRatio`, which is still read when this is not set."
|
|
371
373
|
}
|
|
372
374
|
}
|
|
373
375
|
}
|
|
@@ -411,7 +413,7 @@
|
|
|
411
413
|
]
|
|
412
414
|
},
|
|
413
415
|
"devDependencies": {
|
|
414
|
-
"@stacksjs/stx-vscode": "^0.2.
|
|
416
|
+
"@stacksjs/stx-vscode": "^0.2.357",
|
|
415
417
|
"@types/vscode": "~1.109.0",
|
|
416
418
|
"@vscode/vsce": "^4.0.0"
|
|
417
419
|
}
|
|
@@ -31,9 +31,18 @@ function fromStx(path: string): string {
|
|
|
31
31
|
return STX_DIR + path.replace(/^\.\//, '')
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
/**
|
|
34
|
+
/** The namespace of the extension's own commands; every other one is stx's. */
|
|
35
|
+
export const OWN_COMMAND_PREFIX = 'stacks.'
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* `manifest` with its stx contributions replaced by the library's.
|
|
39
|
+
*
|
|
40
|
+
* Commands are told apart by namespace, not by the library's current list: a
|
|
41
|
+
* command stx renamed or dropped is no longer in that list, and filtering by
|
|
42
|
+
* it kept the old entry as if it were this extension's own (`css.reload`
|
|
43
|
+
* outlived its rename to `stx.reloadUtilityClasses` that way).
|
|
44
|
+
*/
|
|
35
45
|
export function withStxContributes(manifest: any, stx: StxContributes): any {
|
|
36
|
-
const stxCommands = new Set(stx.commands.map(command => command.command))
|
|
37
46
|
const contributes = manifest.contributes
|
|
38
47
|
const sections: Array<{ title: string }> = Array.isArray(contributes.configuration) ? contributes.configuration : [contributes.configuration]
|
|
39
48
|
|
|
@@ -43,7 +52,7 @@ export function withStxContributes(manifest: any, stx: StxContributes): any {
|
|
|
43
52
|
...contributes,
|
|
44
53
|
languages: stx.languages.map(language => ({ ...language, configuration: fromStx(language.configuration) })),
|
|
45
54
|
grammars: stx.grammars.map(grammar => ({ ...grammar, path: fromStx(grammar.path) })),
|
|
46
|
-
commands: [...contributes.commands.filter((command: { command: string }) =>
|
|
55
|
+
commands: [...contributes.commands.filter((command: { command: string }) => command.command.startsWith(OWN_COMMAND_PREFIX)), ...stx.commands],
|
|
47
56
|
configuration: [...sections.filter(section => section.title !== stx.configuration.title), stx.configuration],
|
|
48
57
|
},
|
|
49
58
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { describe, expect, it } from 'bun:test'
|
|
11
11
|
import { readFileSync } from 'node:fs'
|
|
12
12
|
import { join } from 'node:path'
|
|
13
|
-
import { libraryContributes, withStxContributes } from '../scripts/stx-contributes'
|
|
13
|
+
import { libraryContributes, OWN_COMMAND_PREFIX, withStxContributes } from '../scripts/stx-contributes'
|
|
14
14
|
|
|
15
15
|
const root = join(import.meta.dir, '..')
|
|
16
16
|
const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'))
|
|
@@ -61,6 +61,19 @@ describe('stx language support', () => {
|
|
|
61
61
|
expect(withStxContributes(manifest, libraryContributes(root))).toEqual(manifest)
|
|
62
62
|
})
|
|
63
63
|
|
|
64
|
+
it('declares no stx command the library no longer ships', () => {
|
|
65
|
+
const shipped = new Set(libraryContributes(root).commands.map(command => command.command))
|
|
66
|
+
const stale = manifest.contributes.commands
|
|
67
|
+
.map((command: { command: string }) => command.command)
|
|
68
|
+
.filter((id: string) => !id.startsWith(OWN_COMMAND_PREFIX) && !shipped.has(id))
|
|
69
|
+
expect(stale).toEqual([])
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it('drops a command stx renamed when syncing', () => {
|
|
73
|
+
const stale = { ...manifest, contributes: { ...manifest.contributes, commands: [...manifest.contributes.commands, { command: 'css.reload', title: 'Css: Reload Configuration' }] } }
|
|
74
|
+
expect(withStxContributes(stale, libraryContributes(root))).toEqual(manifest)
|
|
75
|
+
})
|
|
76
|
+
|
|
64
77
|
it('declares the stx language and its grammar from the bundled assets', () => {
|
|
65
78
|
expect(manifest.contributes.languages.map((language: { id: string }) => language.id)).toContain('stx')
|
|
66
79
|
expect(manifest.contributes.grammars[0].path).toStartWith('./dist/stx/')
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.46",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@iconify-json/f7": "^1.2.2",
|
|
57
57
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
58
|
-
"@stacksjs/mobile": "^0.75.
|
|
58
|
+
"@stacksjs/mobile": "^0.75.46",
|
|
59
59
|
"@stacksjs/sanitizer": "^0.2.348",
|
|
60
60
|
"ts-qr-codes": "^0.1.8"
|
|
61
61
|
}
|
|
@@ -294,7 +294,10 @@ function clearFilters() {
|
|
|
294
294
|
statusFilter.set('all')
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
// `null` opens the editor on a new post: the "New post" buttons pass it, and
|
|
298
|
+
// the body below already handles it. Typed `BlogPost` alone, every one of those
|
|
299
|
+
// calls was a type error that a parse failure elsewhere in this file hid.
|
|
300
|
+
async function openEditor(post: BlogPost | null) {
|
|
298
301
|
const requestId = ++editorRequestId
|
|
299
302
|
formError.set('')
|
|
300
303
|
editingPost.set(post)
|
|
@@ -83,9 +83,9 @@ jobs:
|
|
|
83
83
|
persist-credentials: true
|
|
84
84
|
|
|
85
85
|
- name: Setup Pantry
|
|
86
|
-
uses: pantry-pm/pantry/packages/action@
|
|
86
|
+
uses: pantry-pm/pantry/packages/action@605fd435116c4666ea81150add528760632e0bfb # v0.11.69
|
|
87
87
|
with:
|
|
88
|
-
version: '0.11.
|
|
88
|
+
version: '0.11.69'
|
|
89
89
|
install: 'false'
|
|
90
90
|
|
|
91
91
|
- name: Install Dependencies
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
uses: actions/checkout@v4
|
|
31
31
|
|
|
32
32
|
- name: Setup Pantry
|
|
33
|
-
uses: pantry-pm/pantry/packages/action@
|
|
33
|
+
uses: pantry-pm/pantry/packages/action@605fd435116c4666ea81150add528760632e0bfb # v0.11.69
|
|
34
34
|
with:
|
|
35
35
|
install: 'false'
|
|
36
36
|
|
|
@@ -63,7 +63,7 @@ jobs:
|
|
|
63
63
|
uses: actions/checkout@v4
|
|
64
64
|
|
|
65
65
|
- name: Setup Pantry
|
|
66
|
-
uses: pantry-pm/pantry/packages/action@
|
|
66
|
+
uses: pantry-pm/pantry/packages/action@605fd435116c4666ea81150add528760632e0bfb # v0.11.69
|
|
67
67
|
with:
|
|
68
68
|
install: 'false'
|
|
69
69
|
|
|
@@ -99,7 +99,7 @@ jobs:
|
|
|
99
99
|
uses: actions/checkout@v4
|
|
100
100
|
|
|
101
101
|
- name: Setup Pantry
|
|
102
|
-
uses: pantry-pm/pantry/packages/action@
|
|
102
|
+
uses: pantry-pm/pantry/packages/action@605fd435116c4666ea81150add528760632e0bfb # v0.11.69
|
|
103
103
|
with:
|
|
104
104
|
install: 'false'
|
|
105
105
|
|
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
fetch-depth: 0
|
|
22
22
|
|
|
23
23
|
- name: Setup Pantry
|
|
24
|
-
uses: pantry-pm/pantry/packages/action@
|
|
24
|
+
uses: pantry-pm/pantry/packages/action@605fd435116c4666ea81150add528760632e0bfb # v0.11.69
|
|
25
25
|
with:
|
|
26
26
|
install: 'false'
|
|
27
27
|
|