fix: set nodeModulesDir to manual (#3493)
Hopefully a less invasive fix for #3378 --------- Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
This commit is contained in:
co-authored by
Marvin Hagemeister
parent
f82bd7e63d
commit
f7a2422e93
@@ -34,6 +34,9 @@ jobs:
|
|||||||
cache: true
|
cache: true
|
||||||
deno-version: ${{ matrix.deno }}
|
deno-version: ${{ matrix.deno }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: deno install
|
||||||
|
|
||||||
- name: Verify formatting
|
- name: Verify formatting
|
||||||
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v2.x'
|
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v2.x'
|
||||||
run: deno fmt --check
|
run: deno fmt --check
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
- name: Run install step
|
||||||
|
run: "deno install"
|
||||||
|
|
||||||
- name: Build step
|
- name: Build step
|
||||||
working-directory: ./www
|
working-directory: ./www
|
||||||
run: "deno task build"
|
run: "deno task build"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodeModulesDir": "auto",
|
"nodeModulesDir": "manual",
|
||||||
"workspace": [
|
"workspace": [
|
||||||
"./packages/*",
|
"./packages/*",
|
||||||
"./www"
|
"./www"
|
||||||
@@ -48,7 +48,10 @@
|
|||||||
"@std/http": "jsr:@std/http@^1.0.15",
|
"@std/http": "jsr:@std/http@^1.0.15",
|
||||||
"@std/uuid": "jsr:@std/uuid@^1.0.7",
|
"@std/uuid": "jsr:@std/uuid@^1.0.7",
|
||||||
"@supabase/postgrest-js": "npm:@supabase/postgrest-js@^1.21.4",
|
"@supabase/postgrest-js": "npm:@supabase/postgrest-js@^1.21.4",
|
||||||
|
"@types/mime-db": "npm:@types/mime-db@^1.43.6",
|
||||||
"@types/node": "npm:@types/node@^24.3.0",
|
"@types/node": "npm:@types/node@^24.3.0",
|
||||||
|
"@types/pg": "npm:@types/pg@^8.15.5",
|
||||||
|
"@types/prismjs": "npm:@types/prismjs@^1.26.5",
|
||||||
"docsearch": "https://esm.sh/@docsearch/js@3.5.2?target=es2020",
|
"docsearch": "https://esm.sh/@docsearch/js@3.5.2?target=es2020",
|
||||||
"esbuild": "npm:esbuild@0.25.7",
|
"esbuild": "npm:esbuild@0.25.7",
|
||||||
"esbuild-wasm": "npm:esbuild-wasm@0.25.7",
|
"esbuild-wasm": "npm:esbuild-wasm@0.25.7",
|
||||||
|
|||||||
@@ -72,9 +72,12 @@
|
|||||||
"npm:@tailwindcss/postcss@^4.1.10": "4.1.13",
|
"npm:@tailwindcss/postcss@^4.1.10": "4.1.13",
|
||||||
"npm:@tailwindcss/vite@^4.1.12": "4.1.13_vite@7.1.5__@types+node@24.3.3__picomatch@4.0.3_@types+node@24.3.3",
|
"npm:@tailwindcss/vite@^4.1.12": "4.1.13_vite@7.1.5__@types+node@24.3.3__picomatch@4.0.3_@types+node@24.3.3",
|
||||||
"npm:@types/babel__core@^7.20.5": "7.20.5",
|
"npm:@types/babel__core@^7.20.5": "7.20.5",
|
||||||
|
"npm:@types/mime-db@^1.43.6": "1.43.6",
|
||||||
"npm:@types/node@^24.1.0": "24.3.3",
|
"npm:@types/node@^24.1.0": "24.3.3",
|
||||||
"npm:@types/node@^24.2.1": "24.3.3",
|
"npm:@types/node@^24.2.1": "24.3.3",
|
||||||
"npm:@types/node@^24.3.0": "24.3.3",
|
"npm:@types/node@^24.3.0": "24.3.3",
|
||||||
|
"npm:@types/pg@^8.15.5": "8.15.5",
|
||||||
|
"npm:@types/prismjs@^1.26.5": "1.26.5",
|
||||||
"npm:autoprefixer@^10.4.21": "10.4.21_postcss@8.5.6",
|
"npm:autoprefixer@^10.4.21": "10.4.21_postcss@8.5.6",
|
||||||
"npm:cssnano@^6.1.2": "6.1.2_postcss@8.5.6",
|
"npm:cssnano@^6.1.2": "6.1.2_postcss@8.5.6",
|
||||||
"npm:esbuild-wasm@0.25.7": "0.25.7",
|
"npm:esbuild-wasm@0.25.7": "0.25.7",
|
||||||
@@ -1817,12 +1820,32 @@
|
|||||||
"@types/estree@1.0.8": {
|
"@types/estree@1.0.8": {
|
||||||
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="
|
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="
|
||||||
},
|
},
|
||||||
|
"@types/mime-db@1.43.6": {
|
||||||
|
"integrity": "sha512-r2cqxAt/Eo5yWBOQie1lyM1JZFCiORa5xtLlhSZI0w8RJggBPKw8c4g/fgQCzWydaDR5bL4imnmix2d1n52iBw=="
|
||||||
|
},
|
||||||
|
"@types/node@24.2.0": {
|
||||||
|
"integrity": "sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==",
|
||||||
|
"dependencies": [
|
||||||
|
"undici-types"
|
||||||
|
]
|
||||||
|
},
|
||||||
"@types/node@24.3.3": {
|
"@types/node@24.3.3": {
|
||||||
"integrity": "sha512-GKBNHjoNw3Kra1Qg5UXttsY5kiWMEfoHq2TmXb+b1rcm6N7B3wTrFYIf/oSZ1xNQ+hVVijgLkiDZh7jRRsh+Gw==",
|
"integrity": "sha512-GKBNHjoNw3Kra1Qg5UXttsY5kiWMEfoHq2TmXb+b1rcm6N7B3wTrFYIf/oSZ1xNQ+hVVijgLkiDZh7jRRsh+Gw==",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"undici-types"
|
"undici-types"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"@types/pg@8.15.5": {
|
||||||
|
"integrity": "sha512-LF7lF6zWEKxuT3/OR8wAZGzkg4ENGXFNyiV/JeOt9z5B+0ZVwbql9McqX5c/WStFq1GaGso7H1AzP/qSzmlCKQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"@types/node@24.2.0",
|
||||||
|
"pg-protocol",
|
||||||
|
"pg-types"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"@types/prismjs@1.26.5": {
|
||||||
|
"integrity": "sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ=="
|
||||||
|
},
|
||||||
"ansi-regex@5.0.1": {
|
"ansi-regex@5.0.1": {
|
||||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
|
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
|
||||||
},
|
},
|
||||||
@@ -3504,7 +3527,7 @@
|
|||||||
"vite@7.1.5_@types+node@24.3.3_picomatch@4.0.3": {
|
"vite@7.1.5_@types+node@24.3.3_picomatch@4.0.3": {
|
||||||
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
|
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"@types/node",
|
"@types/node@24.3.3",
|
||||||
"esbuild",
|
"esbuild",
|
||||||
"fdir",
|
"fdir",
|
||||||
"picomatch@4.0.3",
|
"picomatch@4.0.3",
|
||||||
@@ -3516,7 +3539,7 @@
|
|||||||
"fsevents"
|
"fsevents"
|
||||||
],
|
],
|
||||||
"optionalPeers": [
|
"optionalPeers": [
|
||||||
"@types/node"
|
"@types/node@24.3.3"
|
||||||
],
|
],
|
||||||
"bin": true
|
"bin": true
|
||||||
},
|
},
|
||||||
@@ -3689,7 +3712,10 @@
|
|||||||
"npm:@preact/signals@^2.2.1",
|
"npm:@preact/signals@^2.2.1",
|
||||||
"npm:@supabase/postgrest-js@^1.21.4",
|
"npm:@supabase/postgrest-js@^1.21.4",
|
||||||
"npm:@tailwindcss/postcss@^4.1.10",
|
"npm:@tailwindcss/postcss@^4.1.10",
|
||||||
|
"npm:@types/mime-db@^1.43.6",
|
||||||
"npm:@types/node@^24.3.0",
|
"npm:@types/node@^24.3.0",
|
||||||
|
"npm:@types/pg@^8.15.5",
|
||||||
|
"npm:@types/prismjs@^1.26.5",
|
||||||
"npm:esbuild-wasm@0.25.7",
|
"npm:esbuild-wasm@0.25.7",
|
||||||
"npm:esbuild@0.25.7",
|
"npm:esbuild@0.25.7",
|
||||||
"npm:github-slugger@2",
|
"npm:github-slugger@2",
|
||||||
@@ -3713,6 +3739,13 @@
|
|||||||
"jsr:@std/encoding@^1.0.10"
|
"jsr:@std/encoding@^1.0.10"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"packages/examples": {
|
||||||
|
"dependencies": [
|
||||||
|
"jsr:@fresh/core@2",
|
||||||
|
"npm:@preact/signals@^2.2.1",
|
||||||
|
"npm:preact@^10.27.0"
|
||||||
|
]
|
||||||
|
},
|
||||||
"packages/fresh": {
|
"packages/fresh": {
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"jsr:@std/fmt@^1.0.8",
|
"jsr:@std/fmt@^1.0.8",
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
"name": "@fresh/examples",
|
"name": "@fresh/examples",
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"imports": {
|
||||||
|
"fresh": "jsr:@fresh/core@^2.0.0",
|
||||||
|
"preact": "npm:preact@^10.27.0",
|
||||||
|
"@preact/signals": "npm:@preact/signals@^2.2.1"
|
||||||
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
"./island": "./src/island.tsx",
|
"./island": "./src/island.tsx",
|
||||||
"./app1": "./src/app1.tsx",
|
"./app1": "./src/app1.tsx",
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ import {
|
|||||||
} from "@deno/loader";
|
} from "@deno/loader";
|
||||||
import * as path from "@std/path";
|
import * as path from "@std/path";
|
||||||
import * as babel from "@babel/core";
|
import * as babel from "@babel/core";
|
||||||
import babelReact from "@babel/preset-react";
|
|
||||||
import { httpAbsolute } from "./patches/http_absolute.ts";
|
import { httpAbsolute } from "./patches/http_absolute.ts";
|
||||||
import { JS_REG, JSX_REG } from "../utils.ts";
|
import { JS_REG, JSX_REG } from "../utils.ts";
|
||||||
import { builtinModules } from "node:module";
|
import { builtinModules } from "node:module";
|
||||||
|
|
||||||
|
// @ts-ignore Workaround for https://github.com/denoland/deno/issues/30850
|
||||||
|
const { default: babelReact } = await import("@babel/preset-react");
|
||||||
|
|
||||||
const BUILTINS = new Set(builtinModules);
|
const BUILTINS = new Set(builtinModules);
|
||||||
|
|
||||||
interface DenoState {
|
interface DenoState {
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ import type { Plugin } from "vite";
|
|||||||
import * as babel from "@babel/core";
|
import * as babel from "@babel/core";
|
||||||
import { cjsPlugin } from "./patches/commonjs.ts";
|
import { cjsPlugin } from "./patches/commonjs.ts";
|
||||||
import { jsxComments } from "./patches/jsx_comment.ts";
|
import { jsxComments } from "./patches/jsx_comment.ts";
|
||||||
import babelReact from "@babel/preset-react";
|
|
||||||
import { inlineEnvVarsPlugin } from "./patches/inline_env_vars.ts";
|
import { inlineEnvVarsPlugin } from "./patches/inline_env_vars.ts";
|
||||||
import { removePolyfills } from "./patches/remove_polyfills.ts";
|
import { removePolyfills } from "./patches/remove_polyfills.ts";
|
||||||
import { JS_REG, JSX_REG } from "../utils.ts";
|
import { JS_REG, JSX_REG } from "../utils.ts";
|
||||||
import { codeEvalPlugin } from "./patches/code_eval.ts";
|
import { codeEvalPlugin } from "./patches/code_eval.ts";
|
||||||
|
|
||||||
|
// @ts-ignore Workaround for https://github.com/denoland/deno/issues/30850
|
||||||
|
const { default: babelReact } = await import("@babel/preset-react");
|
||||||
|
|
||||||
export function patches(): Plugin {
|
export function patches(): Plugin {
|
||||||
let isDev = false;
|
let isDev = false;
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -8,13 +8,16 @@ import "prismjs/components/prism-bash.js";
|
|||||||
import "prismjs/components/prism-yaml.js";
|
import "prismjs/components/prism-yaml.js";
|
||||||
import "prismjs/components/prism-ignore.js";
|
import "prismjs/components/prism-ignore.js";
|
||||||
|
|
||||||
|
// deno-lint-ignore no-explicit-any
|
||||||
|
const languages = Prism.languages as any;
|
||||||
|
|
||||||
/** Extends `sh` with `deno` as a function token in Shell/Bash languages */
|
/** Extends `sh` with `deno` as a function token in Shell/Bash languages */
|
||||||
Prism.languages.sh.deno = {
|
languages.sh.deno = {
|
||||||
pattern: /(^|[\s;|&]|[<>]\()(?:deno)(?=$|[)\s;|&])/,
|
pattern: /(^|[\s;|&]|[<>]\()(?:deno)(?=$|[)\s;|&])/,
|
||||||
lookbehind: true,
|
lookbehind: true,
|
||||||
alias: "function",
|
alias: "function",
|
||||||
};
|
};
|
||||||
Prism.languages.bash.deno = Prism.languages.sh.deno;
|
languages.bash.deno = languages.sh.deno;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds `txt-files` language for file-structure code blocks.
|
* Adds `txt-files` language for file-structure code blocks.
|
||||||
|
|||||||
Reference in New Issue
Block a user