Skip to content

Commit c2bcdaf

Browse files
committed
Merge branch 'main' of github.com:nuxt/scripts into fix/youtube-placeholder-url
2 parents f580c81 + fef53f7 commit c2bcdaf

File tree

97 files changed

+8144
-5676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+8144
-5676
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
18-
- run: corepack enable
19-
- uses: actions/setup-node@v4
18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
2020
with:
21-
node-version: 18
22-
cache: pnpm
21+
version: 9.15.2
22+
run_install: false
23+
- name: Install Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
cache: 'pnpm'
2328
- run: pnpm install
24-
2529
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
2630
# Install playwright's binary under custom directory to cache
2731
- name: Set Playwright path (non-windows)

.github/workflows/release.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ jobs:
1414
permissions:
1515
id-token: write
1616
steps:
17-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18-
- run: corepack enable
19-
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
17+
- uses: actions/checkout@v4
18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
2020
with:
21-
node-version: 20
22-
registry-url: 'https://registry.npmjs.org/'
23-
cache: pnpm
24-
25-
- name: Install dependencies
26-
run: pnpm install
21+
version: 9.15.2
22+
run_install: false
23+
- name: Install Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
cache: 'pnpm'
28+
- run: pnpm install
2729

2830
- name: Prepare build environment
2931
run: pnpm dev:prepare

CHANGELOG.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,196 @@
11
# Changelog
22

33

4+
## v0.9.5
5+
6+
[compare changes](https://github.com/nuxt/scripts/compare/v0.9.4...v0.9.5)
7+
8+
### 🚀 Enhancements
9+
10+
- **googleMaps:** Language & region params ([#286](https://github.com/nuxt/scripts/pull/286))
11+
- Improved script warmup ([#302](https://github.com/nuxt/scripts/pull/302))
12+
13+
### 🩹 Fixes
14+
15+
- Avoid warming delayed script src ([357d02a](https://github.com/nuxt/scripts/commit/357d02a))
16+
- **stripe:** Prefer `@stripe/stripe-js` over `@types/stripe-v3` ([#300](https://github.com/nuxt/scripts/pull/300))
17+
- Optional Valibot schema ([#287](https://github.com/nuxt/scripts/pull/287))
18+
19+
### 📖 Documentation
20+
21+
- Fix typo/incomplete sentence ([#285](https://github.com/nuxt/scripts/pull/285))
22+
23+
### 🏡 Chore
24+
25+
- Type issue ([6490ce3](https://github.com/nuxt/scripts/commit/6490ce3))
26+
- Type issue ([0c5135c](https://github.com/nuxt/scripts/commit/0c5135c))
27+
- Playground for multi datalayers ([#173](https://github.com/nuxt/scripts/pull/173))
28+
- Test scripts ([1f7df13](https://github.com/nuxt/scripts/commit/1f7df13))
29+
- Broken ci ([c89380f](https://github.com/nuxt/scripts/commit/c89380f))
30+
- **devtools:** Fix deprecation ([29864f1](https://github.com/nuxt/scripts/commit/29864f1))
31+
- Bump deps & lint ([c54412f](https://github.com/nuxt/scripts/commit/c54412f))
32+
33+
### ❤️ Contributors
34+
35+
- Harlan ([@harlan-zw](http://github.com/harlan-zw))
36+
- Harlan Wilton ([@harlan-zw](http://github.com/harlan-zw))
37+
- Julien Huang ([@huang-julien](http://github.com/huang-julien))
38+
- Morgan-retex ([@morgan-retex](http://github.com/morgan-retex))
39+
- Stefano Bartoletti ([@stefanobartoletti](http://github.com/stefanobartoletti))
40+
41+
## v0.9.4
42+
43+
[compare changes](https://github.com/nuxt/scripts/compare/v0.9.3...v0.9.4)
44+
45+
### 🩹 Fixes
46+
47+
- **matomo:** Easier cloud config using `cloudId` ([d7e18c4](https://github.com/nuxt/scripts/commit/d7e18c4))
48+
- **matomo:** Support numeric `siteId` ([299516c](https://github.com/nuxt/scripts/commit/299516c))
49+
- Avoid overriding `<link rek="preload"` with invalid src ([25f1ade](https://github.com/nuxt/scripts/commit/25f1ade))
50+
51+
### 📖 Documentation
52+
53+
- Fix docs for disabling scripts in development ([#281](https://github.com/nuxt/scripts/pull/281))
54+
55+
### 🏡 Chore
56+
57+
- Bump deps ([931f4f6](https://github.com/nuxt/scripts/commit/931f4f6))
58+
59+
### ❤️ Contributors
60+
61+
- Harlan ([@harlan-zw](http://github.com/harlan-zw))
62+
- Paul ([@schnetzi](http://github.com/schnetzi))
63+
64+
## v0.9.3
65+
66+
[compare changes](https://github.com/nuxt/scripts/compare/v0.9.2...v0.9.3)
67+
68+
### 🩹 Fixes
69+
70+
- Use free path for virtual plugin template ([8624923](https://github.com/nuxt/scripts/commit/8624923))
71+
- 🐛 Fixed "height" css style property ([#275](https://github.com/nuxt/scripts/pull/275))
72+
- **adsense:** Push ad slot once only on dev ([#276](https://github.com/nuxt/scripts/pull/276))
73+
74+
### 📖 Documentation
75+
76+
- Update scripts:registry hook example ([#271](https://github.com/nuxt/scripts/pull/271))
77+
- ✏️ Updated definition for YouTube Player ([#273](https://github.com/nuxt/scripts/pull/273))
78+
79+
### 🏡 Chore
80+
81+
- Bump deps ([81f0923](https://github.com/nuxt/scripts/commit/81f0923))
82+
83+
### ❤️ Contributors
84+
85+
- Harlan ([@harlan-zw](http://github.com/harlan-zw))
86+
- Asoka Wotulo ([@asokawotulo](http://github.com/asokawotulo))
87+
- Arb85 ([@arb85](http://github.com/arb85))
88+
- Bernhard Berger ([@bernhardberger](http://github.com/bernhardberger))
89+
90+
## v0.9.2
91+
92+
[compare changes](https://github.com/nuxt/scripts/compare/v0.9.1...v0.9.2)
93+
94+
### 🩹 Fixes
95+
96+
- Types for ref triggers ([7b3570d](https://github.com/nuxt/scripts/commit/7b3570d))
97+
- Cache bundled scripts relative to nuxt root ([cc5e01b](https://github.com/nuxt/scripts/commit/cc5e01b))
98+
99+
### 🏡 Chore
100+
101+
- Bump deps ([582d360](https://github.com/nuxt/scripts/commit/582d360))
102+
- Missing import ([9e33732](https://github.com/nuxt/scripts/commit/9e33732))
103+
104+
### ❤️ Contributors
105+
106+
- Harlan ([@harlan-zw](http://github.com/harlan-zw))
107+
108+
## v0.9.1
109+
110+
[compare changes](https://github.com/nuxt/scripts/compare/v0.9.0...v0.9.1)
111+
112+
### 🩹 Fixes
113+
114+
- Prefer ref triggers or promise booleans ([bacd3de](https://github.com/nuxt/scripts/commit/bacd3de))
115+
116+
### 🏡 Chore
117+
118+
- Ensure dir for script ([e4f140c](https://github.com/nuxt/scripts/commit/e4f140c))
119+
- Recommend 1.11.5 unhead ([9c1a3e3](https://github.com/nuxt/scripts/commit/9c1a3e3))
120+
121+
### ❤️ Contributors
122+
123+
- Harlan ([@harlan-zw](http://github.com/harlan-zw))
124+
125+
## v0.9.0
126+
127+
[compare changes](https://github.com/nuxt/scripts/compare/v0.8.5...v0.9.0)
128+
129+
### 🚀 Enhancements
130+
131+
- Allow fallback on bundle fail ([#255](https://github.com/nuxt/scripts/pull/255))
132+
133+
### 🩹 Fixes
134+
135+
- **adsense:** ⚠️ Remove default `data-ad-format` ([#248](https://github.com/nuxt/scripts/pull/248))
136+
- Improved `bundle: true` debug and cache clearing ([d269066](https://github.com/nuxt/scripts/commit/d269066))
137+
- **metaPixel:** Use meta logo instead of facebook logo ([#264](https://github.com/nuxt/scripts/pull/264))
138+
- Insert script src with `app.baseURL` ([52e1fcb](https://github.com/nuxt/scripts/commit/52e1fcb))
139+
140+
### 🏡 Chore
141+
142+
- Broken type checking ([97a5218](https://github.com/nuxt/scripts/commit/97a5218))
143+
- Bump deps and lint ([e73b4c6](https://github.com/nuxt/scripts/commit/e73b4c6))
144+
- Fix playground ([575c4dd](https://github.com/nuxt/scripts/commit/575c4dd))
145+
146+
#### ⚠️ Breaking Changes
147+
148+
- **adsense:** ⚠️ Remove default `data-ad-format` ([#248](https://github.com/nuxt/scripts/pull/248))
149+
150+
### ❤️ Contributors
151+
152+
- Harlan ([@harlan-zw](http://github.com/harlan-zw))
153+
- 2nofa11 ([@2nofa11](http://github.com/2nofa11))
154+
- Julien Huang ([@huang-julien](http://github.com/huang-julien))
155+
- Asoka Wotulo ([@asokawotulo](http://github.com/asokawotulo))
156+
157+
## v0.8.5
158+
159+
[compare changes](https://github.com/nuxt/scripts/compare/v0.8.4...v0.8.5)
160+
161+
### 🩹 Fixes
162+
163+
- **bundling:** Throw error if download fails ([#253](https://github.com/nuxt/scripts/pull/253))
164+
- Group failed scripts log ([#254](https://github.com/nuxt/scripts/pull/254))
165+
- **YouTube:** Broken api types ([a00f753](https://github.com/nuxt/scripts/commit/a00f753))
166+
167+
### 🏡 Chore
168+
169+
- Maybe fix vimeo types ([159fdcd](https://github.com/nuxt/scripts/commit/159fdcd))
170+
- Bump deps ([e0034fa](https://github.com/nuxt/scripts/commit/e0034fa))
171+
172+
### ❤️ Contributors
173+
174+
- Harlan <harlan@harlanzw.com>
175+
- Julien Huang <julien.h.dev@gmail.com>
176+
177+
## v0.8.4
178+
179+
[compare changes](https://github.com/nuxt/scripts/compare/v0.8.3...v0.8.4)
180+
181+
### 🩹 Fixes
182+
183+
- **ScriptGoogleMaps:** Clean up map markers properly ([53bb530](https://github.com/nuxt/scripts/commit/53bb530))
184+
185+
### 🏡 Chore
186+
187+
- Bump deps and lint ([06c757c](https://github.com/nuxt/scripts/commit/06c757c))
188+
- Sync lock ([bdc5f98](https://github.com/nuxt/scripts/commit/bdc5f98))
189+
190+
### ❤️ Contributors
191+
192+
- Harlan <harlan@harlanzw.com>
193+
4194
## v0.8.3
5195

6196
[compare changes](https://github.com/nuxt/scripts/compare/v0.8.2...v0.8.3)

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![nuxt-scripts-social-card](https://github.com/nuxt/scripts/blob/main/.github/banner.png)](https://scripts.nuxt.com)
22

3-
[![npm version][npm-version-src]][npm-version-href]
4-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
3+
[![npm version][npm-version-src]][npm-href]
4+
[![npm downloads][npm-downloads-src]][npm-href]
55
[![License][license-src]][license-href]
66
[![Nuxt][nuxt-src]][nuxt-href]
77
[![Volta][volta-src]][volta-href]
@@ -58,13 +58,11 @@ Licensed under the [MIT license](https://github.com/nuxt/scripts/blob/main/LICEN
5858

5959
<!-- Badges -->
6060
[npm-version-src]: https://img.shields.io/npm/v/@nuxt/scripts/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
61-
[npm-version-href]: https://npmjs.com/package/@nuxt/scripts/v/rc
62-
6361
[npm-downloads-src]: https://img.shields.io/npm/dm/@nuxt/scripts.svg?style=flat&colorA=18181B&colorB=28CF8D
64-
[npm-downloads-href]: https://npmjs.com/package/@nuxt/scripts/v/rc
62+
[npm-href]: https://npmjs.com/package/@nuxt/scripts
6563

6664
[license-src]: https://img.shields.io/npm/l/@nuxt/scripts.svg?style=flat&colorA=18181B&colorB=28CF8D
67-
[license-href]: https://npmjs.com/package/@nuxt/scripts/v/rc
65+
[license-href]: https://github.com/nuxt/scripts/blob/main/LICENSE.md
6866

6967
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
7068
[nuxt-href]: https://nuxt.com

client/composables/shiki.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Highlighter, Lang } from 'shiki'
2-
import { getHighlighter } from 'shiki'
1+
import type { Highlighter, BundledLanguage } from 'shiki'
2+
import { createHighlighter } from 'shiki'
33
import { computed, ref, toValue } from 'vue'
44
import type { MaybeRef } from '@vueuse/core'
55
import { devtools } from './rpc'
@@ -8,7 +8,7 @@ export const shiki = ref<Highlighter>()
88

99
export function loadShiki() {
1010
// Only loading when needed
11-
return getHighlighter({
11+
return createHighlighter({
1212
themes: [
1313
'vitesse-dark',
1414
'vitesse-light',
@@ -28,7 +28,7 @@ export function loadShiki() {
2828
})
2929
}
3030

31-
export function renderCodeHighlight(code: MaybeRef<string>, lang?: Lang) {
31+
export function renderCodeHighlight(code: MaybeRef<string>, lang: BundledLanguage) {
3232
return computed(() => {
3333
const colorMode = devtools.value?.colorMode || 'light'
3434
return shiki.value!.codeToHtml(toValue(code), {

client/nuxt.config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import { DEVTOOLS_UI_ROUTE } from '../src/constants'
44
const resolver = createResolver(import.meta.url)
55

66
export default defineNuxtConfig({
7-
ssr: false,
8-
devtools: { enabled: false },
97

108
modules: [
119
'@nuxt/devtools-ui-kit',
1210
],
13-
nitro: {
14-
output: {
15-
publicDir: resolver.resolve('../dist/client'),
16-
},
17-
},
11+
ssr: false,
12+
devtools: { enabled: false },
1813
app: {
1914
baseURL: DEVTOOLS_UI_ROUTE,
2015
},
2116

2217
compatibilityDate: '2024-07-04',
18+
nitro: {
19+
output: {
20+
publicDir: resolver.resolve('../dist/client'),
21+
},
22+
},
2323
})

client/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"generate": "nuxi generate"
1212
},
1313
"devDependencies": {
14-
"@iconify-json/carbon": "^1.2.1",
15-
"@nuxt/devtools-kit": "^1.4.1",
16-
"@nuxt/devtools-ui-kit": "latest",
17-
"@nuxt/kit": "^3.13.1",
14+
"@iconify-json/carbon": "^1.2.5",
15+
"@nuxt/devtools-kit": "^1.7.0",
16+
"@nuxt/devtools-ui-kit": "^1.7.0",
17+
"@nuxt/kit": "^3.15.0",
1818
"nuxt": "latest",
19-
"vue": "3.4.31",
19+
"vue": "^3.5.13",
2020
"vue-router": "latest"
2121
}
2222
}

docs/content/docs/1.getting-started/2.installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: Learn how to create a Nuxt Scripts project or add it to your curren
88
To get started, simply run:
99

1010
```bash
11-
npx nuxi@latest module add @nuxt/scripts
11+
npx nuxi@latest module add scripts
1212
```
1313

1414
That's it! The Nuxt Scripts module should be downloaded and added to your Nuxt Config `modules`.

docs/content/docs/1.getting-started/3.confetti-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ useScript('https://cdn.jsdelivr.net/npm/js-confetti@0.12.0/dist/js-confetti.brow
5050

5151
```ts [useHead]
5252
useHead({
53-
scripts: [
53+
script: [
5454
{ src: 'https://cdn.jsdelivr.net/npm/js-confetti@latest/dist/js-confetti.browser.js' }
5555
]
5656
})

0 commit comments

Comments
 (0)