Skip to content

Commit 4acf48d

Browse files
author
Guillaume Chau
committed
chore: update to latest apollo
1 parent f261410 commit 4acf48d

File tree

5 files changed

+153
-116
lines changed

5 files changed

+153
-116
lines changed

packages/@vue/cli-ui/apollo-server/connectors/git.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const execa = require('execa')
22
const path = require('path')
33
const fs = require('fs-extra')
44
const parseDiff = require('../util/parse-diff')
5-
const { highlightCode } = require('../util/highlight')
65
// Connectors
76
const cwd = require('./cwd')
87
// Utils
@@ -28,6 +27,8 @@ async function getNewFiles (context) {
2827
async function getDiffs (context) {
2928
if (!hasProjectGit(cwd.get())) return []
3029

30+
const { highlightCode } = require('../util/highlight')
31+
3132
const newFiles = await getNewFiles(context)
3233
await execa('git', ['add', '-N', '*'], {
3334
cwd: cwd.get()

packages/@vue/cli-ui/apollo-server/util/highlight.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
const Prism = require('prismjs')
2-
const loadLanguages = require('prismjs/components/')
3-
const path = require('path')
1+
// Prism don't like cjs with EMS package
2+
// So we use ES modules for the whole file
3+
import Prism from 'prismjs'
4+
import loadLanguages from 'prismjs/components/index.js'
5+
import path from 'path'
46

57
loadLanguages()
68

@@ -19,7 +21,7 @@ const languages = [
1921
{ test: /\.yml$/, lang: 'yaml' }
2022
]
2123

22-
exports.highlightCode = function (filename, content, lang = null) {
24+
export function highlightCode (filename, content, lang = null) {
2325
let language
2426
if (lang) {
2527
language = { lang }

packages/@vue/cli-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"semver": "^5.5.0",
5353
"shortid": "^2.2.11",
5454
"terminate": "^2.1.0",
55-
"vue-cli-plugin-apollo": "^0.14.6",
55+
"vue-cli-plugin-apollo": "^0.16.3",
5656
"watch": "^1.0.2"
5757
},
5858
"devDependencies": {

packages/@vue/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"chalk": "^2.4.1",
3030
"cmd-shim": "^2.0.2",
3131
"commander": "^2.16.0",
32-
"core-js": "^2.5.7",
3332
"debug": "^3.1.0",
3433
"deepmerge": "^2.1.1",
3534
"download-git-repo": "^1.0.2",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy