Skip to content

Releases: ZhongxuYang/vite-plugin-version-mark

v0.2.2

05 Aug 02:19

Choose a tag to compare

CHANGELOG

v0.2.2

🔧 Compatibility Update

  • IMPROVED: Relaxed Node.js version requirements for better compatibility
  • NOTE: While Nuxt v4+ requires Node 20.19.0 || >=22.12.0, this plugin maintains broader Node.js compatibility to support projects that cannot upgrade immediately

v0.2.1

🎉 Major Feature Release: Multi-Command Support

  • NEW: Multi-command support - Execute multiple commands and combine their results
  • NEW: Custom format templates with {alias} placeholder syntax
  • NEW: Error handling strategies: strict, skip, and fallback
  • NEW: Parallel command execution for better performance
  • NEW: Command configuration with aliases, timeouts, and fallback values
  • NEW: Custom separators for combining results
  • ENHANCED: Complete TypeScript type definitions with detailed JSDoc comments
  • ENHANCED: Comprehensive test coverage (71 tests)
  • ENHANCED: Updated documentation with multi-command examples
  • ENHANCED: New playground demo project showcasing all features
  • MAINTAINED: Full backward compatibility - existing string command configurations work unchanged

Multi-Command Examples

// Simple multi-command with default separator
command: {
  commands: [
    'git rev-parse --abbrev-ref HEAD',  // Get branch name
    'git rev-parse --short HEAD'        // Get short commit SHA
  ]
  // Output: "main-abc1234"
}

// Advanced multi-command with custom format
command: {
  commands: [
    { alias: 'branch', cmd: 'git rev-parse --abbrev-ref HEAD', fallback: 'unknown' },
    { alias: 'sha', cmd: 'git rev-parse --short HEAD', timeout: 5000 }
  ],
  format: '{branch}-{sha}',
  errorStrategy: 'fallback'
  // Output: "main-abc1234"
}

v0.1.4

v0.1.3

  • Store script tag for global variable in head instead of body. (by @richardvanthof)

v0.1.2

  • Fix type VitePluginVersionMarkInput.
  • Update README.

v0.1.1

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.2.1

02 Aug 14:43

Choose a tag to compare

CHANGELOG

v0.2.0

🎉 Major Feature Release: Multi-Command Support

  • NEW: Multi-command support - Execute multiple commands and combine their results
  • NEW: Custom format templates with {alias} placeholder syntax
  • NEW: Error handling strategies: strict, skip, and fallback
  • NEW: Parallel command execution for better performance
  • NEW: Command configuration with aliases, timeouts, and fallback values
  • NEW: Custom separators for combining results
  • ENHANCED: Complete TypeScript type definitions with detailed JSDoc comments
  • ENHANCED: Comprehensive test coverage (71 tests)
  • ENHANCED: Updated documentation with multi-command examples
  • ENHANCED: New playground demo project showcasing all features
  • MAINTAINED: Full backward compatibility - existing string command configurations work unchanged

Multi-Command Examples

// Simple multi-command with default separator
command: {
  commands: [
    'git rev-parse --abbrev-ref HEAD',  // Get branch name
    'git rev-parse --short HEAD'        // Get short commit SHA
  ]
  // Output: "main-abc1234"
}

// Advanced multi-command with custom format
command: {
  commands: [
    { alias: 'branch', cmd: 'git rev-parse --abbrev-ref HEAD', fallback: 'unknown' },
    { alias: 'sha', cmd: 'git rev-parse --short HEAD', timeout: 5000 }
  ],
  format: '{branch}-{sha}',
  errorStrategy: 'fallback'
  // Output: "main-abc1234"
}

v0.1.4

v0.1.3

  • Store script tag for global variable in head instead of body. (by @richardvanthof)

v0.1.2

  • Fix type VitePluginVersionMarkInput.
  • Update README.

v0.1.1

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.2.0

02 Aug 13:09

Choose a tag to compare

CHANGELOG

v0.2.0

🎉 Major Feature Release: Multi-Command Support

  • NEW: Multi-command support - Execute multiple commands and combine their results
  • NEW: Custom format templates with {alias} placeholder syntax
  • NEW: Error handling strategies: strict, skip, and fallback
  • NEW: Parallel command execution for better performance
  • NEW: Command configuration with aliases, timeouts, and fallback values
  • NEW: Custom separators for combining results
  • ENHANCED: Complete TypeScript type definitions with detailed JSDoc comments
  • ENHANCED: Comprehensive test coverage (71 tests)
  • ENHANCED: Updated documentation with multi-command examples
  • ENHANCED: New playground demo project showcasing all features
  • MAINTAINED: Full backward compatibility - existing string command configurations work unchanged

Multi-Command Examples

// Simple multi-command with default separator
command: {
  commands: [
    'git rev-parse --abbrev-ref HEAD',  // Get branch name
    'git rev-parse --short HEAD'        // Get short commit SHA
  ]
  // Output: "main-abc1234"
}

// Advanced multi-command with custom format
command: {
  commands: [
    { alias: 'branch', cmd: 'git rev-parse --abbrev-ref HEAD', fallback: 'unknown' },
    { alias: 'sha', cmd: 'git rev-parse --short HEAD', timeout: 5000 }
  ],
  format: '{branch}-{sha}',
  errorStrategy: 'fallback'
  // Output: "main-abc1234"
}

v0.1.4

v0.1.3

  • Store script tag for global variable in head instead of body. (by @richardvanthof)

v0.1.2

  • Fix type VitePluginVersionMarkInput.
  • Update README.

v0.1.1

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.1.4

05 Dec 05:08

Choose a tag to compare

CHANGELOG

v0.1.4

v0.1.3

  • Store script tag for global variable in head instead of body. (by @richardvanthof)

v0.1.2

  • Fix type VitePluginVersionMarkInput.
  • Update README.

v0.1.1

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.1.3

26 Nov 15:51

Choose a tag to compare

CHANGELOG

v0.1.3

  • Store script tag for global variable in head instead of body. (by @richardvanthof)

v0.1.2

  • Fix type VitePluginVersionMarkInput.
  • Update README.

v0.1.1

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.1.2

21 Oct 03:28

Choose a tag to compare

CHANGELOG

v0.1.2

  • Fix type VitePluginVersionMarkInput.
  • Update README.

v0.1.1

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.1.1

19 Oct 12:23

Choose a tag to compare

CHANGELOG

v0.1.1

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.1.0

10 Jul 15:07

Choose a tag to compare

CHANGELOG

v0.1.0

  • Yarn switch to pnpm.
  • Add unit tests.
  • Add commitlint.
  • Change logo.

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.0.13

14 Apr 06:41

Choose a tag to compare

CHANGELOG

v0.0.13

  • Fix source Map warning on build.

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.

v0.0.12

13 Mar 07:47

Choose a tag to compare

CHANGELOG

v0.0.12

  • Update the confusing attributes ifShortSHA and ifGitSHA. If you want to enable ifShortSHA, you do not need to configure ifGitSHA to be true. (by @littlecxm)
  • The default value of ifShortSHA is changed to false.

v0.0.11

  • Support export version field in the entry file.

v0.0.10

  • Fix the bug that the version is not defined global after ifGlobal: true.

v0.0.9

  • The ifGlobal setting mode is switched to vite.define, so that the node.js environment can read. (by @censujiang)

v0.0.8

  • Support provide a custom command to retrieve the version. (by @kgutwin)

v0.0.5 - v0.0.7

  • Optimizations & support Nuxt3+.

v0.0.1 - v0.0.4

  • First release & bug fixing.