Skip to content

Commit f3cadc2

Browse files
committed
👍 Add JSR support
1 parent 46417cf commit f3cadc2

File tree

5 files changed

+70
-13
lines changed

5 files changed

+70
-13
lines changed

.github/workflows/jsr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: jsr
2+
3+
env:
4+
DENO_VERSION: 1.x
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: denoland/setup-deno@v1
23+
with:
24+
deno-version: ${{ env.DENO_VERSION }}
25+
- name: Publish
26+
run: |
27+
deno run -A jsr:@david/publish-on-tag@0.1.3

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,14 @@ jobs:
113113
os: ${{ runner.os }}
114114
files: ./coverage.lcov
115115
token: ${{ secrets.CODECOV_TOKEN }}
116+
117+
jsr-publish:
118+
runs-on: ubuntu-latest
119+
steps:
120+
- uses: actions/checkout@v4
121+
- uses: denoland/setup-deno@v1
122+
with:
123+
deno-version: ${{ env.DENO_VERSION }}
124+
- name: Publish (dry-run)
125+
run: |
126+
deno publish --dry-run

buffer/fileformat.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
import {
2-
assert,
3-
ensure,
4-
is,
5-
maybe,
6-
type PredicateType,
7-
} from "@core/unknownutil";
1+
import { assert, ensure, is, maybe, type Predicate } from "@core/unknownutil";
2+
3+
export type FileFormat = "unix" | "dos" | "mac";
84

95
/**
106
* Predicate that the value is FileFormat.
117
*/
12-
export const isFileFormat = is.LiteralOneOf(["unix", "dos", "mac"] as const);
13-
14-
export type FileFormat = PredicateType<typeof isFileFormat>;
8+
export const isFileFormat: Predicate<FileFormat> = is.LiteralOneOf(
9+
["unix", "dos", "mac"] as const,
10+
);
1511

1612
/**
1713
* Assert that the value is FileFormat.

deno.jsonc

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,34 @@
22
"name": "@denops/std",
33
"version": "0.0.0",
44
"exports": {
5-
".": "./mod.ts"
5+
".": "./mod.ts",
6+
"./argument": "./argument/mod.ts",
7+
"./autocmd": "./autocmd/mod.ts",
8+
"./batch": "./batch/mod.ts",
9+
"./buffer": "./buffer/mod.ts",
10+
"./bufname": "./bufname/mod.ts",
11+
"./function": "./function/mod.ts",
12+
"./function/vim": "./function/vim/mod.ts",
13+
"./function/nvim": "./function/nvim/mod.ts",
14+
"./helper": "./helper/mod.ts",
15+
"./helper/execute": "./helper/execute.ts",
16+
"./helper/expr_string": "./helper/expr_string.ts",
17+
"./helper/keymap": "./helper/keymap.ts",
18+
"./helper/input": "./helper/input.ts",
19+
"./helper/load": "./helper/load.ts",
20+
"./helper/echo": "./helper/echo.ts",
21+
"./lambda": "./lambda/mod.ts",
22+
"./mapping": "./mapping/mod.ts",
23+
"./option": "./option/mod.ts",
24+
"./option/vim": "./option/vim/mod.ts",
25+
"./option/nvim": "./option/nvim/mod.ts",
26+
"./popup": "./popup/mod.ts",
27+
"./variable": "./variable/mod.ts"
628
},
729
"exclude": [
830
"docs/**",
9-
".coverage/**"
31+
".coverage/**",
32+
".scripts/**"
1033
],
1134
"imports": {
1235
"@core/unknownutil": "jsr:@core/unknownutil@^3.18.0",

helper/expr_string.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export type ExprString = string & {
3838
/**
3939
* @internal
4040
*/
41-
readonly [EXPR_STRING_MARK]: 1;
41+
readonly __denops_expr_string: 1;
4242
};
4343

4444
type Jsonable = {

0 commit comments

Comments
 (0)