Skip to content

Commit 97e5caa

Browse files
committed
chore: get name and version from package.json directly
1 parent a8a5283 commit 97e5caa

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
import { parseStyleElements } from "./style/index"
2626
import { analyzeScope } from "./script/scope-analyzer"
2727
import { analyzeScriptSetupScope } from "./script-setup/scope-analyzer"
28+
import { name, version } from "../package.json"
2829

2930
const STARTS_WITH_LT = /^\s*</u
3031

@@ -211,7 +212,6 @@ function parseAsScript(code: string, options: ParserOptions) {
211212
}
212213

213214
export const meta = {
214-
name: "vue-eslint-parser",
215-
// eslint-disable-next-line no-process-env
216-
version: process.env.PACKAGE_VERSION,
215+
name,
216+
version,
217217
}

tsdown.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import { defineConfig } from "tsdown"
2-
import pkg from "./package.json"
32

43
export default defineConfig({
54
entry: "./src/index.ts",
65
target: "es2015",
76
sourcemap: true,
8-
env: {
9-
PACKAGE_VERSION: pkg.version,
10-
},
117
outputOptions: {
128
banner: `/**
139
* @author Toru Nagashima <https://github.com/mysticatea>

0 commit comments

Comments
 (0)