Skip to content

Commit 4988f3a

Browse files
committed
use js-yaml
1 parent 0e847a4 commit 4988f3a

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

_scripts/sync-sponsors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
const fs = require('fs')
33
const path = require('path')
44
const axios = require('axios')
5-
const yaml = require('yaml')
5+
const yaml = require('js-yaml')
66

77
const configPath = path.resolve(__dirname, '../themes/vue/_config.yml')
88

99
;(async () => {
1010
const { data } = await axios(`https://sponsors.vuejs.org/data.json`)
11-
const yml = yaml.stringify(data)
11+
const yml = yaml.dump(data)
1212
const config = fs.readFileSync(configPath, 'utf-8')
1313
const updated = config.replace(
1414
/(# START SPONSORS)[^]*(# END SPONSORS)/,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"hexo-renderer-stylus": "^0.3.3",
2929
"hexo-server": "^0.3.1",
3030
"hoek": "^6.1.2",
31-
"yaml": "^2.1.1"
31+
"js-yaml": "^4.1.0"
3232
}
3333
}

themes/vue/_config.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ special:
1010
description: An IDE for Vue
1111
platinum:
1212
- name: VueSchool
13-
url: https://vueschool.io/?utm_source=Vuejs.org&utm_medium=Banner&utm_campaign=Sponsored%20Banner&utm_content=V1
13+
url: >-
14+
https://vueschool.io/?utm_source=Vuejs.org&utm_medium=Banner&utm_campaign=Sponsored%20Banner&utm_content=V1
1415
img: vueschool.png
1516
- name: Vehikl
1617
url: https://vehikl.com/
@@ -22,7 +23,8 @@ platinum:
2223
url: https://www.storyblok.com
2324
img: storyblok.png
2425
- name: Ionic
25-
url: https://ionicframework.com/vue?utm_source=partner&utm_medium=referral&utm_campaign=vuesponsorship&utm_content=vuedocs
26+
url: >-
27+
https://ionicframework.com/vue?utm_source=partner&utm_medium=referral&utm_campaign=vuesponsorship&utm_content=vuedocs
2628
img: ionic.png
2729
- name: Nuxt
2830
url: https://nuxtjs.org/
@@ -31,7 +33,8 @@ platinum:
3133
url: https://www.refurbed.org/?utm_source=vuejs
3234
img: refurbed.png
3335
- name: ButterCMS
34-
url: https://buttercms.com/vuejs-cms/?utm_source=vuejs.org&utm_medium=banner&utm_campaign=sponsorship
36+
url: >-
37+
https://buttercms.com/vuejs-cms/?utm_source=vuejs.org&utm_medium=banner&utm_campaign=sponsorship
3538
img: buttercms.svg
3639
- name: Sanofi
3740
url: https://www.sanofi.com/
@@ -44,7 +47,8 @@ platinum_china:
4447
url: https://www.dcloud.io/hbuilderx.html?hmsr=vue-en&hmpl=&hmcu=&hmkw=&hmci=
4548
img: hbuilder.png
4649
- name: Authing
47-
url: https://www.authing.cn/welcome?utm_source=Vuejs&utm_medium=CPT&utm_campaign=EN&utm_term=page-EN
50+
url: >-
51+
https://www.authing.cn/welcome?utm_source=Vuejs&utm_medium=CPT&utm_campaign=EN&utm_term=page-EN
4852
img: authing.svg
4953
- name: 稀土掘金技术社区
5054
url: https://juejin.cn/frontend?utm_source=vue&utm_campaign=sponsor
@@ -84,7 +88,7 @@ gold:
8488
url: https://js.devexpress.com/
8589
img: devexpress.png
8690
- name: FASTCODING Inc
87-
url: "https://fastcoding.jp/javascript/ "
91+
url: 'https://fastcoding.jp/javascript/ '
8892
img: fastcoding_inc.svg
8993
- name: StoreKit
9094
url: https://storekit.com
@@ -134,7 +138,7 @@ gold:
134138
- name: QuickBooks Tool Hub
135139
url: https://quickbookstoolhub.com
136140
img: quickbooks_tool_hub.png
137-
- name: "1394"
141+
- name: '1394'
138142
url: https://1394ta.org/buy-instagram-followers/
139143
img: 1394.png?v2
140144
- name: Snyk
@@ -166,7 +170,8 @@ silver:
166170
url: https://www.interflora.fr
167171
img: interflora_group.png
168172
- name: Localazy
169-
url: https://localazy.com/blog/how-to-localize-vuejs-app-with-vue-i18n-and-localazy?utm_source=vuejs&utm_medium=banner&utm_campaign=sponsorships_vuejs&utm_content=logo
173+
url: >-
174+
https://localazy.com/blog/how-to-localize-vuejs-app-with-vue-i18n-and-localazy?utm_source=vuejs&utm_medium=banner&utm_campaign=sponsorships_vuejs&utm_content=logo
170175
img: localazy.png
171176
- name: AddWeb Solution
172177
url: http://addwebsolution.com/

yarn.lock

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ argparse@^1.0.7:
112112
dependencies:
113113
sprintf-js "~1.0.2"
114114

115+
argparse@^2.0.1:
116+
version "2.0.1"
117+
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
118+
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
119+
115120
arr-diff@^2.0.0:
116121
version "2.0.0"
117122
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
@@ -1859,6 +1864,13 @@ js-yaml@^3.6.1:
18591864
argparse "^1.0.7"
18601865
esprima "^4.0.0"
18611866

1867+
js-yaml@^4.1.0:
1868+
version "4.1.0"
1869+
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
1870+
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
1871+
dependencies:
1872+
argparse "^2.0.1"
1873+
18621874
jsonparse@^1.2.0:
18631875
version "1.3.1"
18641876
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
@@ -3565,11 +3577,6 @@ yallist@^3.0.0, yallist@^3.0.3:
35653577
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
35663578
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
35673579

3568-
yaml@^2.1.1:
3569-
version "2.1.1"
3570-
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec"
3571-
integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==
3572-
35733580
yargs@^3.32.0:
35743581
version "3.32.0"
35753582
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995"

0 commit comments

Comments
 (0)