Skip to content

Commit

Permalink
fix: Use named import querystring module (vuejs#199)
Browse files Browse the repository at this point in the history
fixes vuejs#198
  • Loading branch information
znck authored May 15, 2018
1 parent 11739b4 commit b3d63f0
Show file tree
Hide file tree
Showing 8 changed files with 479 additions and 462 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
collectCoverageFrom: ['src/**'],
moduleFileExtensions: ['js', 'ts'],
moduleFileExtensions: ['js', 'ts', 'json'],
transform: {
'^.+\\.ts$': '<rootDir>/node_modules/ts-jest/preprocessor.js',
},
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
},
"scripts": {
"prepublishOnly": "yarn build",
"prebuild": "yarn lint && yarn test",
"prebuild": "yarn lint",
"build": "tsc",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"docs": "typedoc typings src/index.ts",
"lint": "prettier --no-semi --single-quote --write **/*.js **/*.vue !test/target/** !dist/**",
"release": "standard-version -a",
"pretest": "yarn build",
"test": "jest"
},
"files": [
Expand All @@ -38,10 +39,11 @@
],
"dependencies": {
"@babel/runtime": "^7.0.0-beta.46",
"@vue/component-compiler": "^3.3.1",
"@vue/component-compiler": "^3.3.2",
"@vue/component-compiler-utils": "^1.2.1",
"debug": "^2.6.0",
"hash-sum": "^1.0.2",
"postcss": "^6.0.22",
"querystring": "^0.2.0",
"rollup-pluginutils": "^2.0.1"
},
Expand All @@ -56,15 +58,16 @@
"@znck/promised": "^1.0.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^22.4.3",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"conventional-changelog": "^1.1.24",
"jest": "^22.4.2",
"node-sass": "^4.9.0",
"prettier": "^1.12.1",
"pug": "^2.0.3",
"puppeteer": "^1.3.0",
"puppeteer": "^1.4.0",
"rollup": "^0.58.2",
"rollup-plugin-babel": "^4.0.0-beta.4",
"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-css-only": "^0.4.0",
"rollup-plugin-image": "^1.0.2",
"rollup-plugin-md": "^0.0.7",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function VuePlugin(opts: VuePluginOptions = {}): Plugin {
const descriptors = new Map<string, SFCDescriptor>()

return {
name: 'vue.delegate',
name: 'VuePlugin',

resolveId(id, importer) {
if (!isVuePartRequest(id)) return
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
SFCCustomBlock
} from '@vue/component-compiler-utils'
import { createFilter } from 'rollup-pluginutils'
import queryString from 'querystring'
import * as queryString from 'querystring'
import * as path from 'path'

const GET_QUERY = /\.vue(\.[a-z]+?)?\?(.+)$/i
Expand Down
2 changes: 1 addition & 1 deletion test/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {rollup} from 'rollup'
import promised from '@znck/promised'

import {pluginCreateVueApp, plugins} from "./plugins"
import pluginVue from '../../src'
import pluginVue from '../..'

const pluginCSS = require('rollup-plugin-css-only')

Expand Down
2 changes: 2 additions & 0 deletions test/setup/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
const pluginBabel = require('rollup-plugin-babel')
const pluginNodeResolve = require('rollup-plugin-node-resolve')
const pluginCommonJS = require('rollup-plugin-commonjs')
const pluginImage = require('rollup-plugin-image')
const pluginMarkdown = require('rollup-plugin-md')

export const plugins = [
pluginImage(),
pluginMarkdown(),
pluginNodeResolve(),
pluginCommonJS(),
pluginBabel({
presets: [
[require.resolve('@babel/preset-env'), {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"baseUrl": ".",
"outDir": "dist",
"sourceMap": false,
"target": "es2015",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
Expand Down
Loading

0 comments on commit b3d63f0

Please sign in to comment.