Skip to content

Commit b189bb7

Browse files
authored
Merge pull request #1070 from limzykenneth/2.0
Dependencies updates
2 parents 7d0eb82 + 7eff1c6 commit b189bb7

10 files changed

Lines changed: 10283 additions & 7758 deletions

File tree

astro.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if (shouldSkipCompress) {
2020
export default defineConfig({
2121
site: 'https://p5js.org',
2222
compressHTML: false,
23+
legacy: {
24+
collections: true
25+
},
2326
integrations: [
2427
mermaid({autoTheme: true}),
2528
preact({

package-lock.json

Lines changed: 10226 additions & 7736 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
"custom:cleanup": "tsx ./src/scripts/resetBranchTest.ts"
2121
},
2222
"dependencies": {
23-
"@astrojs/check": "^0.5.5",
24-
"@astrojs/mdx": "^2.1.1",
25-
"@astrojs/preact": "^3.1.0",
26-
"@astrojs/tailwind": "^5.1.0",
27-
"@tailwindcss/typography": "^0.5.12",
28-
"astro": "^4.4.1",
23+
"@astrojs/check": "^0.9.6",
24+
"@astrojs/mdx": "^4.3.13",
25+
"@astrojs/preact": "^4.1.3",
26+
"@astrojs/tailwind": "^6.0.2",
27+
"@tailwindcss/typography": "^0.5.19",
28+
"astro": "^5.16.6",
2929
"astro-compress": "^2.2.10",
3030
"astro-mermaid": "^1.2.0",
3131
"astrojs-service-worker": "^2.0.0",
3232
"autoprefixer": "^10.4.20",
3333
"cheerio": "^1.0.0-rc.12",
34-
"cssnano": "^7.0.6",
34+
"cssnano": "^7.1.2",
3535
"fuse.js": "^7.0.0",
3636
"js-yaml": "^4.1.0",
3737
"keyword-extractor": "^0.0.28",
@@ -40,7 +40,7 @@
4040
"preact": "^10.19.5",
4141
"tailwindcss": "^3.4.1",
4242
"typescript": "^5.3.3",
43-
"vitest": "^1.3.1"
43+
"vitest": "^4.0.16"
4444
},
4545
"overrides": {
4646
"react": "npm:@preact/compat@latest",
@@ -61,7 +61,7 @@
6161
"@types/js-yaml": "^4.0.9",
6262
"@types/jsdom": "^21.1.6",
6363
"@types/lodash": "^4.17.1",
64-
"@types/node": "^20.11.19",
64+
"@types/node": "^22.13.0",
6565
"@typescript-eslint/eslint-plugin": "^7.0.2",
6666
"@typescript-eslint/parser": "^7.0.2",
6767
"@uiw/codemirror-extensions-basic-setup": "^4.21.22",

src/components/Dropdown/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ export const Dropdown = ({
152152
</div>
153153
<button
154154
onClick={() => handleOptionClick(option)}
155-
ref={(el) => (optionRefs.current[index] = el as HTMLButtonElement)}
155+
ref={el => {
156+
optionRefs.current[index] = el as HTMLButtonElement
157+
}}
156158
onBlur={handleBlur}
157159
>
158160
<span>{option.label}</span>

src/content/reference/es/p5/createImage.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: createImage
33
module: Imagen
44
submodule: Imagen
55
file: src/image/image.js
6-
description: "<p>Crea un objeto <a href="/reference/p5/p5.Image">p5.Image</a> nuevo.</p><p><code>createImage()</code> utiliza los parámetros <code>width</code> y <code>height</code> para establecer las dimensiones en píxeles del nuevo objeto<a href="/reference/p5/p5.Image">p5.Image</a>. El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> puede ser modificado actualizando su array de<a href="/reference/p5.Image/pixels">píxeles</a> o llamando a sus métodos<a href="/reference/p5.Image/get">get()</a> y<a href="/reference/p5.Image/set">set()</a>. El método <a href="/reference/p5.Image/loadPixels">loadPixels()</a>debe ser llamado antes de leer o modificar los valores de los píxeles. El método <a href="/reference/p5.Image/updatePixels">updatePixels()</a> debe ser llamado npara que los cambios surtan efecto.</p> <p>Nota: El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> es transparente por defecto.</p>"
6+
description: '<p>Crea un objeto <a href="/reference/p5/p5.Image">p5.Image</a> nuevo.</p><p><code>createImage()</code> utiliza los parámetros <code>width</code> y <code>height</code> para establecer las dimensiones en píxeles del nuevo objeto<a href="/reference/p5/p5.Image">p5.Image</a>. El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> puede ser modificado actualizando su array de<a href="/reference/p5.Image/pixels">píxeles</a> o llamando a sus métodos<a href="/reference/p5.Image/get">get()</a> y<a href="/reference/p5.Image/set">set()</a>. El método <a href="/reference/p5.Image/loadPixels">loadPixels()</a>debe ser llamado antes de leer o modificar los valores de los píxeles. El método <a href="/reference/p5.Image/updatePixels">updatePixels()</a> debe ser llamado npara que los cambios surtan efecto.</p> <p>Nota: El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> es transparente por defecto.</p>'
77
line: '15'
88
isConstructor: 'false'
99
itemtype: method

src/content/reference/es/p5/square.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ line: 1224
2727
isConstructor: false
2828
itemtype: method
2929
example:
30-
- |-
31-
30+
- |
3231
<div>
3332
<code>
3433
function setup() {
@@ -143,6 +142,6 @@ params:
143142
type: Number
144143
optional: true
145144
chainable: true
146-
145+
---
147146

148147
# square

src/scripts/builders/contribute.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,6 @@ const buildContributorDocs = async () => {
322322
console.log("Contributor docs build completed.");
323323
};
324324

325-
buildContributorDocs();
325+
if(import.meta.main){
326+
buildContributorDocs();
327+
}

src/scripts/builders/reference.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,13 @@ const saveMDX = async (mdxDocs: ReferenceMDXDoc[]) => {
461461
}
462462
};
463463

464-
buildReference();
465-
466464
export const testingExports = {
467465
modulePathTree,
468466
memberMethodPreviews: classMethodAndPropertyPreviews,
469467
addDocToModulePathTree,
470468
addMemberMethodPreviewsToClassDocs: addMethodAndPropertyPreviewsToClassDocs,
471469
};
470+
471+
if(import.meta.main){
472+
buildReference();
473+
}

tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"extends": "astro/tsconfigs/strict",
3+
"include": [
4+
"./.astro/types.d.ts",
5+
"**/*"
6+
],
37
"exclude": [
48
"./dist",
59
"./in",
6-
"./.astro",
10+
// "./.astro",
711
"./src/content/examples/**/*.js",
812
"src/scripts/parsers/in",
913
"src/scripts/parsers/out"
1014
],
1115
"compilerOptions": {
16+
"lib": ["es2022"],
1217
"jsx": "react-jsx",
1318
"jsxImportSource": "preact",
1419
"allowJs": true,

vitest.config.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference types="vitest" />
1+
/// <reference types="vitest/config" />
22
import { getViteConfig } from "astro/config";
33
import preact from "@preact/preset-vite";
44

@@ -9,8 +9,30 @@ export default getViteConfig({
99
mainFields: ["module"],
1010
},
1111
test: {
12-
/* for example, use global to avoid globals imports (describe, test, expect): */
13-
// globals: true,
14-
environment: "jsdom",
12+
projects: [
13+
{
14+
extends: true,
15+
test: {
16+
name: "DOM",
17+
environment: "jsdom",
18+
include: [
19+
"test/**/*"
20+
],
21+
exclude: [
22+
"test/pages/*",
23+
"test/mocks/*"
24+
]
25+
}
26+
},
27+
{
28+
extends: true,
29+
test: {
30+
name: "node",
31+
include: [
32+
"test/pages/*"
33+
]
34+
}
35+
}
36+
]
1537
},
1638
});

0 commit comments

Comments
 (0)