Skip to content

Commit

Permalink
refactor: structure (#171)
Browse files Browse the repository at this point in the history
Co-authored-by: nikkeyl <131481562+nikkeyl@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nikkeyl authored Dec 8, 2024
1 parent f9f7aa4 commit 9dafa18
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"type": "module",
"types": "index.d.ts",
"imports": {
"#index": "./src/index.ts",
"#types": "./src/types/index.ts"
"#src/*": "./src/*",
"#types/*": "./src/types/*"
},
"exports": {
".": "./index.js"
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineConfig([
entries: [
{
find: '#types',
replacement: resolve(`${typesFolder}/${entryFile}`),
replacement: resolve(`${typesFolder}/`),
},
],
}),
Expand Down
4 changes: 2 additions & 2 deletions specs/define-config.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expectTypeOf, test as spec } from 'vitest';

import { defineConfig } from '#index';
import type { UserConfig } from '#types';
import { defineConfig } from '#src/index.ts';
import type { UserConfig } from '#types/user-config.ts';

describe('Semantic Release Config', async () => {
spec('should return empty config', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { UserConfig } from '#types';
import type { UserConfig } from '#types/user-config.ts';

/**
* Define an Semantic Release config.
Expand Down
1 change: 0 additions & 1 deletion src/types/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"paths": {
"#types": ["./src/types/index.ts"]
"#types/*": ["./src/types/*"]
},
"rootDir": "src",
"types": ["vitest"],
Expand Down

0 comments on commit 9dafa18

Please sign in to comment.