Skip to content

Commit c37e49f

Browse files
committed
fix(tsconfig): set module resolution to nodenext
1 parent 46b3926 commit c37e49f

14 files changed

+913
-939
lines changed

lib/default-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'path';
2-
import { PluginConfig } from './types';
2+
import { PluginConfig } from './types.js';
33

44
export class DefaultConfig {
55
config: PluginConfig;

lib/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { prepare } from './prepare';
2-
import { publish } from './publish';
3-
import { verify } from './verify';
1+
import { prepare } from './prepare.js';
2+
import { publish } from './publish.js';
3+
import { verify } from './verify.js';
44

55
export { prepare, publish, verify as verifyConditions };

lib/prepare.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { Options } from 'execa';
22
import fs from 'fs';
33
import os from 'os';
44
import path from 'path';
5-
import type { Context } from './@types/semantic-release';
6-
import { DefaultConfig } from './default-options';
7-
import { PluginConfig } from './types';
8-
import { normalizeVersion, pipe, setopt, spawn } from './util';
9-
import { assertExitCode, isLegacyBuildInterface } from './verify';
5+
import type { Context } from './@types/semantic-release/index.js';
6+
import { DefaultConfig } from './default-options.js';
7+
import { PluginConfig } from './types.js';
8+
import { normalizeVersion, pipe, setopt, spawn } from './util.js';
9+
import { assertExitCode, isLegacyBuildInterface } from './verify.js';
1010

1111
async function setVersionPy(setupPy: string, version: string) {
1212
try {

lib/publish.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Options, ResultPromise } from 'execa';
2-
import type { Context } from './@types/semantic-release';
3-
import { DefaultConfig } from './default-options';
4-
import { createVenv } from './prepare';
5-
import { PluginConfig } from './types';
2+
import type { Context } from './@types/semantic-release/index.js';
3+
import { DefaultConfig } from './default-options.js';
4+
import { createVenv } from './prepare.js';
5+
import { PluginConfig } from './types.js';
66
import { pipe, spawn } from './util.js';
77

88
function publishPackage(

lib/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { execa, Options, ResultPromise } from 'execa';
22
import path from 'path';
3-
import { Context } from './@types/semantic-release';
3+
import { Context } from './@types/semantic-release/index.js';
44

55
async function normalizeVersion(
66
version: string,
@@ -38,8 +38,8 @@ function setopt(
3838

3939
function pipe(context: Context): Options {
4040
return {
41-
stdout: context.stdout,
42-
stderr: context.stderr,
41+
stdout: context.stdout as any,
42+
stderr: context.stderr as any,
4343
};
4444
}
4545

lib/verify.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import FormData from 'form-data';
33
import fs from 'fs';
44
import got from 'got';
55
import path from 'path';
6-
import { Context } from './@types/semantic-release';
7-
import { DefaultConfig } from './default-options';
8-
import { PluginConfig } from './types';
9-
import { pipe, spawn } from './util';
6+
import { Context } from './@types/semantic-release/index.js';
7+
import { DefaultConfig } from './default-options.js';
8+
import { PluginConfig } from './types.js';
9+
import { pipe, spawn } from './util.js';
1010

1111
function assertEnvVar(name: string) {
1212
if (!process.env[name]) {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"private": false,
1212
"devDependencies": {
1313
"@semantic-release/git": "^10.0.1",
14+
"@types/node": "^22.7.7",
1415
"@types/uuid": "^9.0.4",
1516
"@typescript-eslint/eslint-plugin": "^6.7.4",
1617
"@typescript-eslint/parser": "^6.7.4",
@@ -36,7 +37,7 @@
3637
"dependencies": {
3738
"execa": "^9.4.1",
3839
"form-data": "^3.0.0",
39-
"got": "^11.8.0"
40+
"got": "^12.6.1"
4041
},
4142
"files": [
4243
"dist/*",

test/package.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { PassThrough } from 'stream';
22
import { expect, test } from 'vitest';
3-
import { prepare, publish, verifyConditions } from '../lib/index';
4-
import { genPackage, hasPackage } from './util';
3+
import { prepare, publish, verifyConditions } from '../lib/index.js';
4+
import { genPackage, hasPackage } from './util.js';
55

66
class EndlessPassThrough extends PassThrough {
7-
end() {}
7+
end(): this {
8+
return this;
9+
}
810
close() {
911
super.end();
1012
}

test/prepare.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import {
66
sDistPackage,
77
setVersionPy,
88
setVersionToml,
9-
} from '../lib/prepare';
10-
import { pipe, spawn } from '../lib/util';
11-
import { assertPackage } from '../lib/verify';
12-
import { genPackage } from './util';
9+
} from '../lib/prepare.js';
10+
import { pipe, spawn } from '../lib/util.js';
11+
import { assertPackage } from '../lib/verify.js';
12+
import { genPackage } from './util.js';
1313

1414
describe('prepare: build functions', () => {
1515
const testCases = [

test/util.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect, test } from 'vitest';
2-
import { DefaultConfig } from '../lib/default-options';
3-
import { normalizeVersion } from '../lib/util';
2+
import { DefaultConfig } from '../lib/default-options.js';
3+
import { normalizeVersion } from '../lib/util.js';
44

55
test('test DefaultConfig', async () => {
66
expect(new DefaultConfig({}).distDir).toBe('dist');

0 commit comments

Comments
 (0)