@blocklet/component-studio-cli 0.6.15 → 0.6.17

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.
@@ -1,7 +1,8 @@
1
1
  import chalk from 'chalk';
2
2
  import { execSync } from 'child_process';
3
3
  import { Command } from 'commander';
4
- import { readFile, writeFile, ensureFile } from 'fs-extra';
4
+ import { existsSync } from 'fs';
5
+ import { readFile, writeFile } from 'fs/promises';
5
6
  import inquirer from 'inquirer';
6
7
  import ora from 'ora';
7
8
  import { join } from 'path';
@@ -75,7 +76,10 @@ export function createBumpVersionCommand() {
75
76
  });
76
77
  // Update changelog
77
78
  const changelogPath = join(blockletInfoPath, 'CHANGELOG.md');
78
- await ensureFile(changelogPath);
79
+ // ensure changelog file exists
80
+ if (!existsSync(changelogPath)) {
81
+ await writeFile(changelogPath, '');
82
+ }
79
83
  let oldChangelog = '';
80
84
  try {
81
85
  oldChangelog = await readFile(changelogPath, 'utf-8');
@@ -10,7 +10,7 @@ import { join, resolve, dirname, basename, relative } from 'node:path';
10
10
  import ora from 'ora';
11
11
  import os from 'os';
12
12
  import path from 'path';
13
- const DEFAULT_WORKSPACE_VERSION = '0.2.0';
13
+ const DEFAULT_WORKSPACE_VERSION = '0.2.1';
14
14
  const METADATA_FILE_NAME = '@metadata.json';
15
15
  export const BLOCKLET_INFO_DIR = '.blocklet-info';
16
16
  // 获取CLI内置的workspace模板路径
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/component-studio-cli",
3
- "version": "0.6.15",
3
+ "version": "0.6.17",
4
4
  "description": "CLI for Component Studio",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -42,7 +42,8 @@
42
42
  "node-fetch": "^2.7.0",
43
43
  "ora": "^8.2.0",
44
44
  "pretty-error": "^4.0.0",
45
- "tar": "^7.4.3"
45
+ "tar": "^7.4.3",
46
+ "yaml": "^2.5.0"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@types/adm-zip": "^0.5.7",
@@ -1,7 +1,7 @@
1
1
  name: CI
2
2
 
3
3
  env:
4
- NODE_OPTIONS: "--max_old_space_size=6144"
4
+ NODE_OPTIONS: '--max_old_space_size=6144'
5
5
 
6
6
  on:
7
7
  pull_request:
@@ -12,7 +12,7 @@ jobs:
12
12
  Deploy:
13
13
  runs-on: ubuntu-latest
14
14
 
15
- if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
15
+ if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')"
16
16
 
17
17
  steps:
18
18
  - name: Checkout repo
@@ -31,8 +31,5 @@ jobs:
31
31
  - name: Install dependencies
32
32
  run: pnpm install
33
33
 
34
- - name: Build libs
35
- run: pnpm build:libs
36
-
37
34
  - name: Lint
38
35
  run: pnpm lint
@@ -11,7 +11,7 @@
11
11
  "noUnusedVariables": "error"
12
12
  },
13
13
  "suspicious": {
14
- "noExplicitAny": "warn"
14
+ "noExplicitAny": "off"
15
15
  },
16
16
  "style": {
17
17
  "noNonNullAssertion": "off",
@@ -12,10 +12,10 @@
12
12
  "scripts": {
13
13
  "dev": "blocklet component dev",
14
14
  "start": "blocklet component dev",
15
- "lint": "biome check . && tsc --noEmit",
15
+ "lint": "biome check ./src && tsc --noEmit",
16
16
  "lint:skip": "echo 'skip lint'",
17
- "lint:fix": "biome check --apply .",
18
- "format": "biome format --write .",
17
+ "lint:fix": "biome check --apply ./src",
18
+ "format": "biome format --write ./src",
19
19
  "prepare": "npx -y simple-git-hooks",
20
20
  "update:deps": "blocklet component update",
21
21
  "update": "blocklet component update",
@@ -11,7 +11,7 @@
11
11
  "noUnusedVariables": "error"
12
12
  },
13
13
  "suspicious": {
14
- "noExplicitAny": "warn"
14
+ "noExplicitAny": "off"
15
15
  },
16
16
  "style": {
17
17
  "noNonNullAssertion": "off",
@@ -15,10 +15,10 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "dev": "COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev",
18
- "lint": "biome check . && tsc --noEmit",
18
+ "lint": "biome check ./src && tsc --noEmit",
19
19
  "lint:skip": "echo 'skip lint'",
20
- "lint:fix": "biome check --apply .",
21
- "format": "biome format --write .",
20
+ "lint:fix": "biome check --apply ./src",
21
+ "format": "biome format --write ./src",
22
22
  "start": "vite-node -c vite-server.config.ts -w api/dev.ts",
23
23
  "clean": "node scripts/build-clean.mjs",
24
24
  "bundle": "echo 'skip bundle'",