create-node-lib 2.9.0 → 2.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-node-lib",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "description": "Scaffolding out a Node.js library module",
5
5
  "bin": "./bin/cli.js",
6
6
  "engines": {
@@ -13,14 +13,11 @@ jobs:
13
13
  steps:
14
14
  - uses: actions/checkout@v4
15
15
 
16
- - name: Markdown Lint
17
- uses: ruzickap/action-my-markdown-linter@26b4129bf0352527e60b5bd739357af63df1b7bf
16
+ - name: Setup Node.js
17
+ uses: actions/setup-node@v4
18
18
  with:
19
- debug: true
20
- config_file: .github/.markdownlint.yml
21
- exclude: |
22
- .changeset/
23
- .github/
24
- CODE_OF_CONDUCT.md
25
- LICENSE
26
- CHANGELOG.md
19
+ node-version: '22'
20
+
21
+ - name: Markdown Lint
22
+ run: |
23
+ npm run lint:markdown || npx -y markdownlint-cli@0.45.0 -c .github/.markdownlint.yml -i '.git' -i '__tests__' -i '.github' -i '.changeset' -i 'CODE_OF_CONDUCT.md' -i 'CHANGELOG.md' -i 'node_modules' -i 'dist' '**/**.md'
@@ -3,7 +3,7 @@ import neostandard, { resolveIgnoresFromGitignore, plugins } from 'neostandard'
3
3
 
4
4
  export default [
5
5
  ...neostandard({
6
- ignores: resolveIgnoresFromGitignore(),
6
+ ignores: ['__tests__/**/*.ts', ...resolveIgnoresFromGitignore()],
7
7
  ts: true, // Enable TypeScript support,
8
8
  filesTs: ['src/**/*.ts', '__tests__/**/*.ts']
9
9
  }),
@@ -11,10 +11,10 @@ export default [
11
11
  pluginSecurity.configs.recommended,
12
12
  {
13
13
  rules: {
14
- 'n/no-process-exit': 'warn',
14
+ 'n/no-process-exit': 'off',
15
15
  'n/no-unsupported-features': 'off',
16
16
  'n/no-unpublished-require': 'off',
17
- 'security/detect-non-literal-fs-filename': 'error',
17
+ 'security/detect-non-literal-fs-filename': 'off',
18
18
  'security/detect-unsafe-regex': 'error',
19
19
  'security/detect-buffer-noassert': 'error',
20
20
  'security/detect-child-process': 'error',
@@ -22,16 +22,18 @@ export default [
22
22
  'security/detect-eval-with-expression': 'error',
23
23
  'security/detect-no-csrf-before-method-override': 'error',
24
24
  'security/detect-non-literal-regexp': 'error',
25
- 'security/detect-object-injection': 'warn',
25
+ 'security/detect-object-injection': 'off',
26
26
  'security/detect-possible-timing-attacks': 'error',
27
27
  'security/detect-pseudoRandomBytes': 'error',
28
28
  'space-before-function-paren': 'off',
29
29
  'object-curly-spacing': 'off',
30
- 'n/hashbang': 'off'
30
+ 'no-control-regex': 'off',
31
+ 'n/hashbang': 'off',
32
+ 'n/no-unsupported-features/node-builtins': 'warn'
31
33
  },
32
34
  languageOptions: {
33
35
  ecmaVersion: 2024,
34
36
  sourceType: 'module',
35
37
  },
36
38
  },
37
- ]
39
+ ]
@@ -35,7 +35,8 @@
35
35
  "scripts": {
36
36
  "start": "node --import tsx src/bin/cli.ts",
37
37
  "build": "tsc && tsup",
38
- "lint": "eslint . && npm run lint:lockfile",
38
+ "lint": "eslint . && npm run lint:lockfile && npm run lint:markdown",
39
+ "lint:markdown": "npx -y markdownlint-cli@0.45.0 -c .github/.markdownlint.yml -i '.git' -i '__tests__' -i '.github' -i '.changeset' -i 'CODE_OF_CONDUCT.md' -i 'CHANGELOG.md' -i 'docs/**' -i 'node_modules' -i 'dist' '**/**.md' --fix",
39
40
  "lint:fix": "eslint . --fix",
40
41
  "lint:lockfile": "lockfile-lint --path package-lock.json --validate-https --allowed-hosts npm yarn",
41
42
  "test": "c8 node --import tsx --test __tests__/**/*.test.ts",
@@ -85,5 +86,22 @@
85
86
  "**/*.{js,json}": [
86
87
  "npm run lint:fix"
87
88
  ]
89
+ },
90
+ "c8": {
91
+ "exclude": [
92
+ "dist/**",
93
+ "coverage/**",
94
+ "__tests__/**",
95
+ "**/*.test.ts",
96
+ "**/*.test.js"
97
+ ],
98
+ "include": [
99
+ "src/**"
100
+ ],
101
+ "reporter": [
102
+ "text",
103
+ "lcov",
104
+ "html"
105
+ ]
88
106
  }
89
107
  }
@@ -5,8 +5,8 @@ import { add } from '../main.ts'
5
5
  const debug = debuglog('<%= projectName %>')
6
6
 
7
7
  async function init () {
8
- const sum = await add(1, 2)
9
- debug(sum.toString())
8
+ const sum = await add(1, 2)
9
+ debug(sum.toString())
10
10
  }
11
11
 
12
12
  init()
@@ -1,3 +1,3 @@
1
- export async function add(arg1: number, arg2: number): Promise<number> {
1
+ export async function add (arg1: number, arg2: number): Promise<number> {
2
2
  return Promise.resolve(arg1 + arg2)
3
3
  }