Skip to content

Commit a96a8b6

Browse files
authored
Merge pull request headlamp-k8s#350 from headlamp-k8s/octokit
tools/releaser: Bump @octokit/rest to 22.0.0
2 parents 1729a25 + 068a99c commit a96a8b6

File tree

14 files changed

+135
-193
lines changed

14 files changed

+135
-193
lines changed

tools/releaser/package-lock.json

Lines changed: 98 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/releaser/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.1.0",
44
"description": "Tool for Headlamp plugin release management",
55
"main": "dist/index.js",
6+
"type": "module",
67
"bin": {
78
"plugin-releaser": "./dist/index.js"
89
},
@@ -12,7 +13,7 @@
1213
"dev": "ts-node src/index.ts"
1314
},
1415
"dependencies": {
15-
"@octokit/rest": "^19.0.13",
16+
"@octokit/rest": "^22.0.0",
1617
"@types/js-yaml": "^4.0.9",
1718
"chalk": "^4.1.2",
1819
"commander": "^11.1.0",

tools/releaser/src/commands/artifacthub.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import chalk from 'chalk';
2-
import { getPluginPath, getPluginInfo, findTarball } from '../utils/plugin';
3-
import { sanitizeVersion, validateVersion } from '../utils/version';
4-
import { checkGitStatus, commitArtifactHubChange } from '../utils/git';
2+
import { getPluginPath, getPluginInfo, findTarball } from '../utils/plugin.js';
3+
import { sanitizeVersion, validateVersion } from '../utils/version.js';
4+
import { checkGitStatus, commitArtifactHubChange } from '../utils/git.js';
55
import {
66
hasArtifactHubFile,
77
updateArtifactHubConfig,
88
createArtifactHubTemplate
9-
} from '../utils/artifacthub';
9+
} from '../utils/artifacthub.js';
1010

1111
interface UpdateArtifactHubOptions {
1212
tarball?: string;

tools/releaser/src/commands/build-package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import chalk from 'chalk';
22
import { execSync } from 'child_process';
33
import path from 'path';
44
import fs from 'fs';
5-
import { getPluginPath, getPluginInfo, findTarball } from '../utils/plugin';
5+
import { getPluginPath, getPluginInfo, findTarball } from '../utils/plugin.js';
66

77
interface PackageOptions {
88
outputDir?: string;

tools/releaser/src/commands/bump.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import chalk from 'chalk';
22
import fs from 'fs';
33
import path from 'path';
44
import { execSync } from 'child_process';
5-
import { getPluginPath } from '../utils/plugin';
6-
import { sanitizeVersion, validateVersion } from '../utils/version';
7-
import { commitPluginVersionChange, checkGitStatus } from '../utils/git';
5+
import { getPluginPath } from '../utils/plugin.js';
6+
import { sanitizeVersion, validateVersion } from '../utils/version.js';
7+
import { commitPluginVersionChange, checkGitStatus } from '../utils/git.js';
88

99
interface BumpOptions {
1010
skipInstall?: boolean;

tools/releaser/src/commands/list.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import chalk from 'chalk';
2-
import { getAllPlugins, getPluginInfo, getPluginPath } from '../utils/plugin';
2+
import { getAllPlugins, getPluginInfo, getPluginPath } from '../utils/plugin.js';
33
import {
44
getLatestTagForPlugin,
55
hasChangesInPluginSinceLatestTag,
66
getCommitsSinceTag
7-
} from '../utils/git';
7+
} from '../utils/git.js';
88

99
interface ListOptions {
1010
changed?: boolean;

tools/releaser/src/commands/package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import chalk from 'chalk';
22
import path from 'path';
33
import fs from 'fs';
44
import { execSync } from 'child_process';
5-
import { getPluginPath, getPluginInfo } from '../utils/plugin';
5+
import { getPluginPath, getPluginInfo } from '../utils/plugin.js';
66

77
interface PackageOptions {
88
outputDir?: string;

tools/releaser/src/commands/release.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import chalk from 'chalk';
22
import path from 'path';
33
import inquirer from 'inquirer';
4-
import { getPluginPath, getPluginInfo, findTarball } from '../utils/plugin';
5-
import { sanitizeVersion, validateVersion } from '../utils/version';
4+
import { getPluginPath, getPluginInfo, findTarball } from '../utils/plugin.js';
5+
import { sanitizeVersion, validateVersion } from '../utils/version.js';
66
import {
77
getChangelogForPlugin,
88
getVersionBumpCommit,
99
validateCommitSha,
1010
isCommitPushedToRemote,
1111
createTagIfNotExists,
1212
pushTagIfNotOnRemote
13-
} from '../utils/git';
13+
} from '../utils/git.js';
1414
import {
1515
getRelease,
1616
getReleaseByName,
1717
createDraftRelease,
1818
uploadAssetToRelease,
1919
getOwnerAndRepo,
2020
publishRelease
21-
} from '../utils/github';
21+
} from '../utils/github.js';
2222

2323
interface ReleaseOptions {
2424
tarball?: string;

tools/releaser/src/commands/tag.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import chalk from 'chalk';
2-
import { getPluginPath, getPluginInfo } from '../utils/plugin';
3-
import { sanitizeVersion, validateVersion } from '../utils/version';
4-
import { createTag } from '../utils/github';
2+
import { getPluginPath, getPluginInfo } from '../utils/plugin.js';
3+
import { sanitizeVersion, validateVersion } from '../utils/version.js';
4+
import { createTag } from '../utils/github.js';
55

66
export function tagPlugin(
77
pluginName: string,

tools/releaser/src/index.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
import { Command } from 'commander';
44
import { readFileSync } from 'fs';
5-
import { join } from 'path';
6-
import { bumpPlugin } from './commands/bump';
7-
import { packagePlugin } from './commands/package';
8-
import { releasePlugin } from './commands/release';
9-
import { listPlugins } from './commands/list';
10-
import { tagPlugin } from './commands/tag';
11-
import { updateArtifactHub } from './commands/artifacthub';
5+
import { join, dirname } from 'path';
6+
import { fileURLToPath } from 'url';
7+
import { bumpPlugin } from './commands/bump.js';
8+
import { packagePlugin } from './commands/package.js';
9+
import { releasePlugin } from './commands/release.js';
10+
import { listPlugins } from './commands/list.js';
11+
import { tagPlugin } from './commands/tag.js';
12+
import { updateArtifactHub } from './commands/artifacthub.js';
13+
14+
const __filename = fileURLToPath(import.meta.url);
15+
const __dirname = dirname(__filename)
1216

1317
const packageJsonPath = join(__dirname, '..', 'package.json');
1418
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));

0 commit comments

Comments
 (0)