Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

major: import Fresh 2.0 code #2449

Merged
merged 39 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2124aa3
major: import Fresh 2.0 code
marvinhagemeister May 21, 2024
56fc300
fix: add missing newline
marvinhagemeister May 22, 2024
04648d1
chore: update www to Fresh 2.0
marvinhagemeister May 21, 2024
d616079
chore: remove deprecated arg
marvinhagemeister May 22, 2024
d3e82c2
chore: mark type-only imports as such
marvinhagemeister May 22, 2024
a38f376
fix: update for Fresh 2
marvinhagemeister May 22, 2024
afee78e
fix: merge issue
marvinhagemeister May 22, 2024
8e475e4
fix: css order issue
marvinhagemeister May 22, 2024
e305ff8
chore: use non-precompile jsx
marvinhagemeister May 22, 2024
a018a82
chore: fix publish workflow
marvinhagemeister May 22, 2024
bc46e18
chore: fix spelling errors
marvinhagemeister May 22, 2024
5a44668
chore: ignore ipsum file
marvinhagemeister May 22, 2024
e666151
chore: extract lorem ipsum
marvinhagemeister May 22, 2024
0b3374f
chore: more spelling
marvinhagemeister May 22, 2024
76524d4
fix: windows shenanigans
marvinhagemeister May 22, 2024
4eb7d8e
fix: free port detection
marvinhagemeister May 22, 2024
d9b1e66
chore: extract windows esbuild plugin
marvinhagemeister May 22, 2024
7fe2d99
chore: change e2e to integration test
marvinhagemeister May 22, 2024
4b5dfec
chore: move test
marvinhagemeister May 22, 2024
1e7d589
chore: remove unused improts
marvinhagemeister May 22, 2024
88b16ad
chore: ignore nullable
marvinhagemeister May 22, 2024
ef4718b
chore: replace puppeteer with astral
marvinhagemeister May 23, 2024
1c1c182
chore: ignore esbuild ops
marvinhagemeister May 23, 2024
473495b
chore: switch to template literals
marvinhagemeister May 23, 2024
7168642
fix: refactor root dir handling for deploying from subdir
marvinhagemeister May 23, 2024
f7fab47
chore: ignore tests for now
marvinhagemeister May 23, 2024
a4f7767
chore: switch to precompile
marvinhagemeister May 23, 2024
880bc02
fix: ensure errors are logged
marvinhagemeister May 23, 2024
11681b8
chore: speed up e2e tests
marvinhagemeister May 23, 2024
0711762
chore: publish
marvinhagemeister May 23, 2024
7bd3c7e
chore: update branch temporarily for JSR publish
marvinhagemeister May 23, 2024
4bda2ee
fix: update versions in init
marvinhagemeister May 23, 2024
c604076
chore: release init
marvinhagemeister May 23, 2024
bdb70b6
chore: update astral + speed up tests
marvinhagemeister May 23, 2024
a543673
chore: reduce flakyness in e2e tests
marvinhagemeister May 23, 2024
80177f8
chore: remove debug logs
marvinhagemeister May 23, 2024
727d2f5
www: fix ga4 bug
marvinhagemeister May 23, 2024
243ac2c
fix: pass through connection info
marvinhagemeister May 23, 2024
5f1dc2f
www: cache assets
marvinhagemeister May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 1 addition & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,7 @@ jobs:
- name: Spell-check
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v1.x'
uses: crate-ci/typos@master

- name: Cache dependencies and Chrome
uses: actions/cache@v4
with:
path: |
${{ matrix.cache_path }}deps
${{ matrix.cache_path }}deno_puppeteer
key: ${{ runner.os }}-${{ hashFiles('**/*deps.ts', 'tests/fixture_twind_hydrate/twind.config.ts') }}

- name: Install Chromium
run: deno run -A --unstable https://deno.land/x/[email protected]/install.ts
env:
PUPPETEER_PRODUCT: chrome


- name: Type check project
run: deno task check:types

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish JSR

on:
push:
branches:
- fresh-2.0-merge

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Publish Fresh
run: deno publish

- name: Publish @fresh/init
working-directory: ./init
run: deno publish

- name: Publish @fresh/plugin-tailwindcss
working-directory: ./plugin-tailwindcss
run: deno publish

- name: Publish @fresh/update
working-directory: ./update
run: deno publish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ _fresh/
tmp/
vendor/
node_modules/
.docs/
.DS_Store
24 changes: 0 additions & 24 deletions .vscode/import_map.json

This file was deleted.

8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.importMap": "./.vscode/import_map.json",
"deno.codeLens.test": true,
"deno.documentPreloadLimit": 2000,
"editor.formatOnSave": true,
Expand All @@ -21,5 +20,10 @@
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"css.customData": [".vscode/tailwind.json"]
"css.customData": [
".vscode/tailwind.json"
],
"[json]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
1 change: 1 addition & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extend-exclude = [
"tests/fixture_partials/routes/scroll_restoration/index.tsx",
"www/static/fonts/FixelVariable.woff2",
"www/static/fonts/FixelVariableItalic.woff2",
"tests/lorem_ipsum.txt",
]

[default]
Expand Down
79 changes: 69 additions & 10 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,83 @@
{
"name": "@fresh/core",
"version": "2.0.0-alpha.9",
"exports": {
".": "./src/mod.ts",
"./runtime": "./src/runtime/shared.ts",
"./client": "./src/runtime/client/mod.tsx",
"./client-dev": "./src/runtime/client/dev.ts",
"./dev": "./src/dev/mod.ts"
},
"lock": false,
"tasks": {
"test": "deno test -A --parallel --trace-ops",
"test": "deno test -A --parallel src/ init/ update/ && deno test -A tests/ www/main_test.ts",
"fixture": "deno run -A --watch=static/,routes/ tests/fixture/dev.ts",
"www": "deno task --cwd=www start",
"build-www": "deno task --cwd=www build",
"screenshot": "deno run -A www/utils/screenshot.ts",
"check:types": "deno check **/*.ts && deno check **/*.tsx",
"check:types": "deno check src/**/*.ts src/**/*.tsx tests/**/*.ts tests/**/*.tsx",
"ok": "deno fmt --check && deno lint && deno task check:types && deno task test",
"install-puppeteer": "PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/[email protected]/install.ts && PUPPETEER_PRODUCT=firefox deno run -A --unstable https://deno.land/x/[email protected]/install.ts",
"test:www": "deno test -A tests/www/",
"manifests": "deno run -A genAllManifest.ts"
},
"exclude": [
"**/_fresh/*",
"**/tmp/*"
],
"importMap": "./.vscode/import_map.json",
"exclude": ["**/_fresh/*", "**/tmp/*", "*/tests_OLD/**"],
"publish": {
"include": [
"src/**",
"deno.json",
"README.md",
"LICENSE",
"www/static/fresh-badge.svg",
"www/static/fresh-badge-dark.svg",
"*.todo"
],
"exclude": ["**/*_test.*", "src/__OLD/**", "*.todo"]
},
"imports": {
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts",
"$marked-mangle": "https://esm.sh/[email protected]",
"$std/": "https://deno.land/[email protected]/",
"@astral/astral": "jsr:@astral/astral@^0.4.0",
"@fresh/core": "./src/mod.ts",
"@fresh/core/client": "./src/runtime/client/mod.tsx",
"@fresh/core/client-dev": "./src/runtime/client/dev.ts",
"@fresh/core/dev": "./src/dev/mod.ts",
"@fresh/core/runtime": "./src/runtime/shared.ts",
"@fresh/plugin-tailwind": "./plugin-tailwindcss/src/mod.ts",
"@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.10.3",
"@preact/signals": "npm:@preact/signals@^1.2.3",
"@std/async": "jsr:@std/async@^0.224.1",
"@std/cli": "jsr:@std/cli@^0.221.0",
"@std/crypto": "jsr:@std/crypto@^0.221.0",
"@std/datetime": "jsr:@std/datetime@^0.224.0",
"@std/encoding": "jsr:@std/encoding@^0.221.0",
"@std/expect": "jsr:@std/expect@^0.224.0",
"@std/fmt": "jsr:@std/fmt@^0.224.0",
"@std/fs": "jsr:@std/fs@^0.221.0",
"@std/html": "jsr:@std/html@^0.224.0",
"@std/jsonc": "jsr:@std/jsonc@^0.221.0",
"@std/media-types": "jsr:@std/media-types@^0.221.0",
"@std/path": "jsr:@std/path@^0.221.0",
"@std/semver": "jsr:@std/semver@^0.223.0",
"@std/streams": "jsr:@std/streams@^0.221.0",
"autoprefixer": "npm:[email protected]",
"cssnano": "npm:[email protected]",
"esbuild": "npm:[email protected]",
"esbuild-wasm": "npm:[email protected]",
"linkedom": "npm:linkedom@^0.16.11",
"postcss": "npm:[email protected]",
"preact": "npm:preact@^10.22.0",
"preact-render-to-string": "npm:preact-render-to-string@^6.4.2",
"tailwindcss": "npm:tailwindcss@^3.4.1",
"tailwindcss/plugin": "npm:/tailwindcss@^3.4.1/plugin.js",
"ts-morph": "npm:ts-morph@^22.0.0",
"twind": "https://esm.sh/[email protected]",
"twind/": "https://esm.sh/[email protected]/"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
"jsx": "precompile",
"jsxImportSource": "preact",
"jsxPrecompileSkipElements": ["a", "img", "source", "body", "html", "head"]
},
"lint": {
"rules": { "exclude": ["no-window"] }
Expand Down
2 changes: 0 additions & 2 deletions dev.ts

This file was deleted.

42 changes: 0 additions & 42 deletions genAllManifest.ts

This file was deleted.

Loading
Loading