Skip to content

Commit

Permalink
fix: remove dependency acorn-numeric-separator (vitejs#4782)
Browse files Browse the repository at this point in the history
deprecated acorn-numeric-separator@0.3.6: acorn>=7.4 supports numeric separators
  • Loading branch information
milahu committed Aug 30, 2021
1 parent 07e97b6 commit aebd2db
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
1 change: 0 additions & 1 deletion packages/vite/package.json
Expand Up @@ -79,7 +79,6 @@
"@vue/compiler-dom": "^3.1.5",
"acorn": "^8.4.1",
"acorn-class-fields": "^1.0.0",
"acorn-numeric-separator": "^0.3.6",
"acorn-static-class-features": "^1.0.0",
"brotli-size": "^4.0.0",
"builtin-modules": "^3.2.0",
Expand Down
7 changes: 2 additions & 5 deletions packages/vite/src/node/server/pluginContainer.ts
Expand Up @@ -51,7 +51,6 @@ import {
} from 'rollup'
import * as acorn from 'acorn'
import acornClassFields from 'acorn-class-fields'
import acornNumericSeparator from 'acorn-numeric-separator'
import acornStaticClassFeatures from 'acorn-static-class-features'
import { RawSourceMap } from '@ampproject/remapping/dist/types/types'
import { combineSourcemaps } from '../utils'
Expand Down Expand Up @@ -116,8 +115,7 @@ type PluginContext = Omit<

export let parser = acorn.Parser.extend(
acornClassFields,
acornStaticClassFeatures,
acornNumericSeparator
acornStaticClassFeatures
)

export async function createPluginContainer(
Expand Down Expand Up @@ -399,8 +397,7 @@ export async function createPluginContainer(
parser = acorn.Parser.extend(
...[
acornClassFields,
acornStaticClassFeatures,
acornNumericSeparator
acornStaticClassFeatures
].concat(options.acornInjectPlugins)
)
}
Expand Down
5 changes: 0 additions & 5 deletions packages/vite/types/shims.d.ts
Expand Up @@ -27,11 +27,6 @@ declare module 'acorn-static-class-features' {
export default plugin
}

declare module 'acorn-numeric-separator' {
const plugin: any
export default plugin
}

declare module 'connect-history-api-fallback' {
const plugin: any
export = plugin
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Expand Up @@ -1654,11 +1654,6 @@ acorn-node@^1.6.1:
acorn-walk "^7.0.0"
xtend "^4.0.2"

acorn-numeric-separator@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/acorn-numeric-separator/-/acorn-numeric-separator-0.3.6.tgz#af7f0abaf8e74bd9ca1117602954d0a3b75804f3"
integrity sha512-jUr5esgChu4k7VzesH/Nww3EysuyGJJcTEEiXqILUFKpO96PNyEXmK21M6nE0TSqGA1PeEg1MzgqJaoFsn9JMw==

acorn-private-class-elements@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/acorn-private-class-elements/-/acorn-private-class-elements-1.0.0.tgz#c5805bf8a46cd065dc9b3513bfebb504c88cd706"
Expand Down

0 comments on commit aebd2db

Please sign in to comment.