@dword-design/base 13.0.3 → 13.0.5

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.
@@ -19,8 +19,7 @@ export default async function () {
19
19
  'eslint.config.ts': true,
20
20
  fixtures: true,
21
21
  'pnpm-lock.yaml': true,
22
- 'pnpm-workspace.yaml': true,
23
- 'types.d.ts': true
22
+ 'pnpm-workspace.yaml': true
24
23
  }), ...Object.keys({
25
24
  '**/*-snapshots/**': true,
26
25
  // For some reason without the trailing ** didn't work
@@ -1,6 +1,4 @@
1
- import pathLib from 'node:path';
2
1
  import packageName from 'depcheck-package-name';
3
- import fs from 'fs-extra';
4
2
  import { mapValues, pick, stubTrue } from 'lodash-es';
5
3
  import sortKeys from 'sort-keys';
6
4
  export default function () {
@@ -17,7 +15,6 @@ export default function () {
17
15
  ...mapValues(this.config.commands, stubTrue)
18
16
  };
19
17
  return {
20
- type: 'module',
21
18
  ...pick(this.packageConfig, Object.keys({
22
19
  baseConfig: true,
23
20
  bin: true,
@@ -33,14 +30,13 @@ export default function () {
33
30
  pnpm: true,
34
31
  private: true,
35
32
  publishConfig: true,
36
- resolutions: true,
37
- type: true,
38
- types: true
33
+ resolutions: true
39
34
  })),
40
35
  funding: 'https://github.com/sponsors/dword-design',
41
36
  publishConfig: {
42
37
  access: 'public'
43
38
  },
39
+ type: 'module',
44
40
  version: this.packageConfig.version || '1.0.0',
45
41
  ...(this.config.git && {
46
42
  repository: `dword-design/${this.config.git.project}`
@@ -49,7 +45,7 @@ export default function () {
49
45
  engines: {
50
46
  node: `>=${this.config.minNodeVersion || this.config.supportedNodeVersions[0]}`
51
47
  },
52
- files: ['dist', ...(fs.existsSync(pathLib.join(this.cwd, 'types.d.ts')) ? ['types.d.ts'] : [])],
48
+ files: ['dist'],
53
49
  license: 'MIT',
54
50
  ...this.config.packageConfig,
55
51
  scripts: sortKeys(mapValues(commandNames, (handler, name) => this.packageConfig.name === '@dword-design/base' ? `${packageName`tsx`} src/cli.ts ${name}` : `base ${name}`))
@@ -0,0 +1 @@
1
+ export default function (): any;
@@ -0,0 +1,19 @@
1
+ import defu from '@dword-design/defu';
2
+ export default function () {
3
+ return defu(this.config.typescriptConfig, {
4
+ compilerOptions: {
5
+ declaration: true,
6
+ esModuleInterop: true,
7
+ module: 'ESNext',
8
+ moduleResolution: 'bundler',
9
+ outDir: 'dist',
10
+ paths: {
11
+ '@/*': ['./*']
12
+ },
13
+ skipLibCheck: true,
14
+ target: 'ESNext'
15
+ },
16
+ exclude: ['**/*.spec.ts'],
17
+ include: ['src']
18
+ });
19
+ }
@@ -11,7 +11,6 @@ import githubFunding from "./github-funding.js";
11
11
  import githubLabelsConfig from "./github-labels.js";
12
12
  import githubSyncLabelsConfig from "./github-sync-labels.js";
13
13
  import npmrc from "./npmrc.js";
14
- import typescriptConfig from "./typescript.js";
15
14
  export default function () {
16
15
  const packageConfig = this.getPackageConfig();
17
16
  return {
@@ -50,6 +49,6 @@ export default function () {
50
49
  'README.md': this.getReadmeString(),
51
50
  'eslint.config.ts': this.getEslintConfig(),
52
51
  'package.json': `${JSON.stringify(sortPackageJson(packageConfig), undefined, 2)}\n`,
53
- 'tsconfig.json': `${JSON.stringify(typescriptConfig, undefined, 2)}\n`
52
+ 'tsconfig.json': `${JSON.stringify(this.getTypescriptConfig(), undefined, 2)}\n`
54
53
  };
55
54
  }
package/dist/index.d.ts CHANGED
@@ -29,6 +29,7 @@ declare class Base {
29
29
  getReleaseConfig(...args: any[]): void;
30
30
  getRenovateConfig(...args: any[]): void;
31
31
  getVscodeConfig(...args: any[]): void;
32
+ getTypescriptConfig(...args: any[]): void;
32
33
  constructor(config?: any, { cwd }?: {
33
34
  cwd?: string;
34
35
  });
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ import getPackageConfig from "./get-generated-files/get-package-config/index.js"
32
32
  import getReadmeString from "./get-generated-files/get-readme-string/index.js";
33
33
  import getReleaseConfig from "./get-generated-files/get-release/index.js";
34
34
  import getRenovateConfig from "./get-generated-files/get-renovate/index.js";
35
+ import getTypescriptConfig from "./get-generated-files/get-typescript.js";
35
36
  import getVscodeConfig from "./get-generated-files/get-vscode/index.js";
36
37
  import githubCodespacesConfig from "./get-generated-files/github-codespaces.js";
37
38
  import getGitInfo from "./get-git-info/index.js";
@@ -113,6 +114,9 @@ class Base {
113
114
  getVscodeConfig(...args) {
114
115
  return getVscodeConfig.call(this, ...args);
115
116
  }
117
+ getTypescriptConfig(...args) {
118
+ return getTypescriptConfig.call(this, ...args);
119
+ }
116
120
  constructor(config = null, {
117
121
  cwd = '.'
118
122
  } = {}) {
@@ -170,6 +174,7 @@ class Base {
170
174
  seeAlso: [],
171
175
  supportedNodeVersions: [18, 20],
172
176
  syncKeywords: true,
177
+ typescriptConfig: {},
173
178
  windows: true
174
179
  };
175
180
  const configsToMerge = [defaultConfig];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base",
3
- "version": "13.0.3",
3
+ "version": "13.0.5",
4
4
  "description": "Base package for projects.",
5
5
  "repository": "dword-design/base",
6
6
  "funding": "https://github.com/sponsors/dword-design",
@@ -28,6 +28,7 @@
28
28
  "@commitlint/config-conventional": "^18.6.3",
29
29
  "@dword-design/base-config-node": "^3.0.7",
30
30
  "@dword-design/ci": "^4.0.6",
31
+ "@dword-design/defu": "^1.0.0",
31
32
  "@dword-design/eslint-config": "^7.0.3",
32
33
  "@dword-design/personal-data": "^2.0.3",
33
34
  "@semantic-release/changelog": "^6.0.3",
@@ -1,17 +0,0 @@
1
- declare const _default: {
2
- compilerOptions: {
3
- declaration: boolean;
4
- esModuleInterop: boolean;
5
- module: string;
6
- moduleResolution: string;
7
- outDir: string;
8
- paths: {
9
- '@/*': string[];
10
- };
11
- skipLibCheck: boolean;
12
- target: string;
13
- };
14
- exclude: string[];
15
- include: string[];
16
- };
17
- export default _default;
@@ -1,16 +0,0 @@
1
- export default {
2
- compilerOptions: {
3
- declaration: true,
4
- esModuleInterop: true,
5
- module: 'ESNext',
6
- moduleResolution: 'bundler',
7
- outDir: 'dist',
8
- paths: {
9
- '@/*': ['./*']
10
- },
11
- skipLibCheck: true,
12
- target: 'ESNext'
13
- },
14
- exclude: ['**/*.spec.ts'],
15
- include: ['src']
16
- };