Skip to content

Commit

Permalink
🐛 npm show
Browse files Browse the repository at this point in the history
  • Loading branch information
takuma-ru committed Jun 7, 2024
1 parent 0d5cb11 commit c9f74da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions packages/release/src/action/packageVersionUp.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { execSync } from "node:child_process";
import { readFileSync, writeFileSync } from "node:fs";
import { join } from "node:path";
import consola from "consola";
import { type ReleaseType, inc } from "semver";
import { PACKAGE_JSON_PATH } from "../constants/config";
import { cmd } from "../utils/cmd";
import type { ReleaseSchemaType } from "../validation/validation";

export const packageVersionUp = ({ level, pre }: ReleaseSchemaType) => {
const packageJsonPath = join(__dirname, PACKAGE_JSON_PATH);
let packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));

const currentVersion = cmd(`npm show ${packageJson.name} version`).trim();
const currentVersion = execSync(`npm show ${packageJson.name} version`, {
encoding: "utf8",
}).trim();

consola.info(`Current version: ${currentVersion}`);

Expand Down
2 changes: 1 addition & 1 deletion packages/unplugin/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { readFileSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { convertScssToCss } from "@unplugin-lit-sass/core";
import type { UnpluginFactory } from "unplugin";
import { createUnplugin } from "unplugin";
import { convertScssToCss } from "unplugin-lit-sass-core";

export type Options = {
/**
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c9f74da

Please sign in to comment.