@sota1235/remark-link-bookmark 0.0.1

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.
@@ -0,0 +1,57 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <code_scheme name="Project" version="173">
3
+ <HTMLCodeStyleSettings>
4
+ <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
+ </HTMLCodeStyleSettings>
6
+ <JSCodeStyleSettings version="0">
7
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
8
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
9
+ <option name="FORCE_QUOTE_STYlE" value="true" />
10
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
11
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
12
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
13
+ </JSCodeStyleSettings>
14
+ <TypeScriptCodeStyleSettings version="0">
15
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
16
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
17
+ <option name="FORCE_QUOTE_STYlE" value="true" />
18
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
19
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
20
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
21
+ </TypeScriptCodeStyleSettings>
22
+ <VueCodeStyleSettings>
23
+ <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
24
+ <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
25
+ </VueCodeStyleSettings>
26
+ <codeStyleSettings language="HTML">
27
+ <option name="SOFT_MARGINS" value="80" />
28
+ <indentOptions>
29
+ <option name="INDENT_SIZE" value="2" />
30
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
31
+ <option name="TAB_SIZE" value="2" />
32
+ </indentOptions>
33
+ </codeStyleSettings>
34
+ <codeStyleSettings language="JavaScript">
35
+ <option name="SOFT_MARGINS" value="80" />
36
+ <indentOptions>
37
+ <option name="INDENT_SIZE" value="2" />
38
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
39
+ <option name="TAB_SIZE" value="2" />
40
+ </indentOptions>
41
+ </codeStyleSettings>
42
+ <codeStyleSettings language="TypeScript">
43
+ <option name="SOFT_MARGINS" value="80" />
44
+ <indentOptions>
45
+ <option name="INDENT_SIZE" value="2" />
46
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
47
+ <option name="TAB_SIZE" value="2" />
48
+ </indentOptions>
49
+ </codeStyleSettings>
50
+ <codeStyleSettings language="Vue">
51
+ <option name="SOFT_MARGINS" value="80" />
52
+ <indentOptions>
53
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
54
+ </indentOptions>
55
+ </codeStyleSettings>
56
+ </code_scheme>
57
+ </component>
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ </profile>
6
+ </component>
package/.idea/misc.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager">
4
+ <output url="file://$PROJECT_DIR$/out" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/remark-link-bookmark.iml" filepath="$PROJECT_DIR$/.idea/remark-link-bookmark.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
package/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Sota Sugiura
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ ts-simple-boilerplate [![codecov](https://codecov.io/gh/sota1235/ts-simple-boilerplate/branch/master/graph/badge.svg)](https://codecov.io/gh/sota1235/ts-simple-boilerplate)
2
+ ====
3
+
4
+ Minimum boilerplate for me.
5
+
6
+ Just for bundling 1 JavaScript file.
7
+
8
+ ### Requirement
9
+
10
+ See [.node-version](./.node-version).
11
+
12
+ ### Usage
13
+
14
+ See `scripts` in `package.json` or run `npm run`.
15
+
16
+ ### Install
17
+
18
+ Just use as template of GitHub repository.
19
+
20
+ ### Licence
21
+
22
+ This software is released under the MIT License, see LICENSE.txt.
23
+
24
+ ## Author
25
+
26
+ [@sota1235](https://github.com/sota1235)
@@ -0,0 +1,69 @@
1
+ {
2
+ "checksums": [
3
+ {
4
+ "id": "github_release/github.com/rhysd/actionlint/v1.7.3/actionlint_1.7.3_darwin_amd64.tar.gz",
5
+ "checksum": "33E960B719C87ECC0C807CF4945FD4078980CD2E626B27DED0E9551C757FA8F6",
6
+ "algorithm": "sha256"
7
+ },
8
+ {
9
+ "id": "github_release/github.com/rhysd/actionlint/v1.7.3/actionlint_1.7.3_darwin_arm64.tar.gz",
10
+ "checksum": "B4E8DAB8DDA48ECEFF6AFEA67D0FE4A14B8D4EA7191CF233C1E1AF8A62F37C24",
11
+ "algorithm": "sha256"
12
+ },
13
+ {
14
+ "id": "github_release/github.com/rhysd/actionlint/v1.7.3/actionlint_1.7.3_linux_amd64.tar.gz",
15
+ "checksum": "37252B4D440B56374B0FC1726E05FD7452D30D6D774F6E9B52E65BB64475F9DB",
16
+ "algorithm": "sha256"
17
+ },
18
+ {
19
+ "id": "github_release/github.com/rhysd/actionlint/v1.7.3/actionlint_1.7.3_linux_arm64.tar.gz",
20
+ "checksum": "5FD82142C39208BFDC51B929FF9BD84C38BCC10B4362EF2261A5D70D38E68E05",
21
+ "algorithm": "sha256"
22
+ },
23
+ {
24
+ "id": "github_release/github.com/rhysd/actionlint/v1.7.3/actionlint_1.7.3_windows_amd64.zip",
25
+ "checksum": "E364347719ACCD53A7BB2E5B370E42E7262D6CEE7C496738A08E319BEFDA38E6",
26
+ "algorithm": "sha256"
27
+ },
28
+ {
29
+ "id": "github_release/github.com/rhysd/actionlint/v1.7.3/actionlint_1.7.3_windows_arm64.zip",
30
+ "checksum": "71B50372A72E1F07CEC38C82783873CEBDDF3EC194BB80119B652A80F9F5447F",
31
+ "algorithm": "sha256"
32
+ },
33
+ {
34
+ "id": "github_release/github.com/suzuki-shunsuke/ghalint/v1.0.0/ghalint_1.0.0_darwin_amd64.tar.gz",
35
+ "checksum": "707BB2D6D4564A950F7AD3A5B3340B0B5BC666FE82B32BD51A5FE0FEF7268804",
36
+ "algorithm": "sha256"
37
+ },
38
+ {
39
+ "id": "github_release/github.com/suzuki-shunsuke/ghalint/v1.0.0/ghalint_1.0.0_darwin_arm64.tar.gz",
40
+ "checksum": "3E3FDA71FFAE83CF713295DF2BEF09FC268811DEAB11DEA58D8CAA287642C9DC",
41
+ "algorithm": "sha256"
42
+ },
43
+ {
44
+ "id": "github_release/github.com/suzuki-shunsuke/ghalint/v1.0.0/ghalint_1.0.0_linux_amd64.tar.gz",
45
+ "checksum": "E9006FF212A3B27A99AF43DB687DED78173BAA2F9816B2E2A9BED03A2ED2F954",
46
+ "algorithm": "sha256"
47
+ },
48
+ {
49
+ "id": "github_release/github.com/suzuki-shunsuke/ghalint/v1.0.0/ghalint_1.0.0_linux_arm64.tar.gz",
50
+ "checksum": "73D110480FB94DB4F5F46980659FCAFB8146ACC0B49D0D3AA6D79EE161C97917",
51
+ "algorithm": "sha256"
52
+ },
53
+ {
54
+ "id": "github_release/github.com/suzuki-shunsuke/ghalint/v1.0.0/ghalint_1.0.0_windows_amd64.zip",
55
+ "checksum": "F91596B58827BBBBAA6EFD8B5220D2C49547D60E30E7CF797E02A9107A39FF11",
56
+ "algorithm": "sha256"
57
+ },
58
+ {
59
+ "id": "github_release/github.com/suzuki-shunsuke/ghalint/v1.0.0/ghalint_1.0.0_windows_arm64.zip",
60
+ "checksum": "77FB1B80BFEFECB2C43098C9BD76BB335435A56E362961E3BD6ED5E18FA471E6",
61
+ "algorithm": "sha256"
62
+ },
63
+ {
64
+ "id": "registries/github_content/github.com/aquaproj/aqua-registry/v4.246.0/registry.yaml",
65
+ "checksum": "153438D21A059F716E695701D3A0E41AF537024C25AB8B6852EE6B996E313C93",
66
+ "algorithm": "sha256"
67
+ }
68
+ ]
69
+ }
package/aqua.yaml ADDED
@@ -0,0 +1,12 @@
1
+ ---
2
+ # aqua - Declarative CLI Version Manager
3
+ # https://aquaproj.github.io/
4
+ checksum:
5
+ enabled: true
6
+ require_checksum: true
7
+ registries:
8
+ - type: standard
9
+ ref: v4.246.0 # renovate: depName=aquaproj/aqua-registry
10
+ packages:
11
+ - name: rhysd/actionlint@v1.7.3
12
+ - name: suzuki-shunsuke/ghalint@v1.0.0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const vitest_1 = require("vitest");
7
+ const remark_1 = require("remark");
8
+ const plugin_js_1 = __importDefault(require("./plugin.js"));
9
+ (0, vitest_1.test)('Input markdown should be expected', async () => {
10
+ const document = `
11
+ # Sample
12
+
13
+ https://example.com
14
+ `;
15
+ const file = await (0, remark_1.remark)().use(plugin_js_1.default).process(document);
16
+ (0, vitest_1.expect)(file).toMatchFileSnapshot('snapshots/output.md');
17
+ });
@@ -0,0 +1 @@
1
+ import './script.js';
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("./script.js");
@@ -0,0 +1,7 @@
1
+ import type { Root } from 'mdast';
2
+ import type { Plugin } from 'unified';
3
+ type Options = {
4
+ className: string;
5
+ };
6
+ declare const remarkLinkBookmark: Plugin<[options: Options], Root>;
7
+ export default remarkLinkBookmark;
package/dist/plugin.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const remarkLinkBookmark = ({ className = 'link-bookmark', }) => {
4
+ console.log(className);
5
+ return (tree) => {
6
+ console.log(tree);
7
+ };
8
+ };
9
+ exports.default = remarkLinkBookmark;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vitest_1 = require("vitest");
4
+ (0, vitest_1.test)('1 + 1 = 2', () => {
5
+ (0, vitest_1.expect)(1 + 1).toBe(2);
6
+ });
@@ -0,0 +1 @@
1
+ export declare function main(): void;
package/dist/script.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.main = main;
4
+ function main() {
5
+ console.log('hello, world');
6
+ }
@@ -0,0 +1,10 @@
1
+ import { configs } from '@sota1235/eslint-config';
2
+
3
+ /** @type {import('eslint').Linter.Config} */
4
+ export default [
5
+ ...configs.base(),
6
+ ...configs.typescript({}),
7
+ {
8
+ ignores: ['node_modules/', 'dist/'],
9
+ }
10
+ ];
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@sota1235/remark-link-bookmark",
3
+ "version": "0.0.1",
4
+ "description": "Remark plugin to convert link to bookmark component",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "dependencies": {
8
+ "@types/mdast": "4.0.4",
9
+ "clsx": "2.1.1",
10
+ "dompurify": "3.1.7",
11
+ "jsdom": "25.0.1",
12
+ "open-graph-scraper": "6.8.2",
13
+ "typescript": "^5.0.0",
14
+ "unified": "11.0.5",
15
+ "unist-util-visit": "5.0.0"
16
+ },
17
+ "devDependencies": {
18
+ "@sota1235/eslint-config": "5.0.1",
19
+ "@types/dompurify": "3.0.5",
20
+ "@types/jsdom": "21.1.7",
21
+ "eslint": "9.14.0",
22
+ "husky": "9.1.6",
23
+ "lint-staged": "15.2.10",
24
+ "prettier": "3.3.3",
25
+ "remark": "15.0.1",
26
+ "ts-loader": "9.5.1",
27
+ "typescript-eslint": "8.13.0",
28
+ "vitest": "^2.1.4"
29
+ },
30
+ "keywords": [
31
+ "remark"
32
+ ],
33
+ "author": "@sota1235",
34
+ "license": "MIT",
35
+ "lint-staged": {
36
+ "*.ts": [
37
+ "npm run fix"
38
+ ]
39
+ },
40
+ "scripts": {
41
+ "build": "tsc -p ./tsconfig.publish.json",
42
+ "build:publish": "tsc -p ./tsconfig.publish.json",
43
+ "watch": "tsc --watch",
44
+ "fix": "npm run prettier && npm run eslint:fix",
45
+ "lint": "npm run eslint",
46
+ "eslint": "eslint 'src/**/*.ts'",
47
+ "eslint:fix": "npm run eslint --fix",
48
+ "prettier": "prettier './src/**/*.ts' --write",
49
+ "test": "vitest",
50
+ "test:ci": "vitest"
51
+ }
52
+ }