Skip to content

Commit

Permalink
chore(deps): massive major deps update (#5574)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Nov 7, 2021
1 parent a1eca7c commit ee30ad7
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 33 deletions.
16 changes: 8 additions & 8 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"typescript",

// breaking changes
"source-map",
"react-refresh",
"cac", // `cac:v6.7.10+` has breaking changes
"react-router", // `react-router:v6.0.0+` has breaking changes
"react-router-dom", // `react-router-dom:v6.0.0+` has breaking changes
"source-map", // `source-map:v0.7.0+` needs more investigation

// breaks since "3.0.1", needs futher investigate
"postcss-load-config",

// ESM Only
"strip-ansi",
"periscopic"
// ESM Only => https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-move-my-commonjs-project-to-esm
"node-fetch",
"periscopic",
"strip-ansi"
]
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"@microsoft/api-extractor": "^7.18.19",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.0.2",
"@types/node": "^15.12.2",
"@types/semver": "^7.3.8",
"@types/node": "^16.11.6",
"@types/semver": "^7.3.9",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"chalk": "^4.1.2",
Expand All @@ -45,20 +45,20 @@
"execa": "^5.1.1",
"fs-extra": "^10.0.0",
"jest": "^27.3.1",
"lint-staged": "^11.2.0",
"lint-staged": "^11.2.6",
"minimist": "^1.2.5",
"node-fetch": "^2.6.6",
"npm-run-all": "^4.1.5",
"playwright-chromium": "^1.16.3",
"prettier": "2.4.1",
"prompts": "^2.4.1",
"prompts": "^2.4.2",
"rimraf": "^3.0.2",
"rollup": "^2.59.0",
"semver": "^7.3.5",
"sirv": "^1.0.17",
"sirv": "^1.0.18",
"ts-jest": "^27.0.7",
"ts-node": "^10.1.0",
"typescript": "~4.4.3",
"ts-node": "^10.4.0",
"typescript": "~4.4.4",
"vite": "workspace:*",
"vitepress": "^0.20.1",
"yorkie": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const vueI18nPlugin = {
return
}
if (/\.ya?ml$/.test(id)) {
code = JSON.stringify(require('js-yaml').safeLoad(code.trim()))
code = JSON.stringify(require('js-yaml').load(code.trim()))
}
return `export default Comp => {
Comp.i18n = ${code}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"debug": "^4.3.2",
"hash-sum": "^2.0.0",
"rollup": "^2.59.0",
"slash": "^3.0.0",
"slash": "^4.0.0",
"source-map": "^0.6.1",
"vue": "^3.2.21"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-vue/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export async function transformMain(
)

// template
const hasTemplateImport = descriptor.template && !isUseInlineTemplate(descriptor, !devServer)
const hasTemplateImport =
descriptor.template && !isUseInlineTemplate(descriptor, !devServer)

let templateCode = ''
let templateMap: RawSourceMap | undefined
Expand Down
11 changes: 5 additions & 6 deletions packages/plugin-vue/src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ export function setResolvedScript(
// Check if we can use compile template as inlined render function
// inside <script setup>. This can only be done for build because
// inlined template cannot be individually hot updated.
export function isUseInlineTemplate(descriptor: SFCDescriptor, isProd: boolean): boolean {
return (
isProd &&
!!descriptor.scriptSetup &&
!descriptor.template?.src
)
export function isUseInlineTemplate(
descriptor: SFCDescriptor,
isProd: boolean
): boolean {
return isProd && !!descriptor.scriptSetup && !descriptor.template?.src
}

export function resolveScript(
Expand Down
24 changes: 15 additions & 9 deletions scripts/jestPerTestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,21 @@ export function slash(p: string): string {

// injected by the test env
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace NodeJS {
interface Global {
page?: Page
viteTestUrl?: string
watcher?: RollupWatcher
beforeAllError: any
}
}
const page: Page | undefined

const browserLogs: string[]
const viteTestUrl: string | undefined
const watcher: RollupWatcher | undefined
let beforeAllError: Error | null // error caught in beforeAll, useful if you want to test error scenarios on build
}

declare const global: {
page?: Page

browserLogs: string[]
viteTestUrl?: string
watcher?: RollupWatcher
beforeAllError: Error | null
}

let server: ViteDevServer | http.Server
Expand Down

0 comments on commit ee30ad7

Please sign in to comment.