Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adonisjs/vite
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.0
Choose a base ref
...
head repository: adonisjs/vite
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.0.0
Choose a head ref
  • 11 commits
  • 4 files changed
  • 2 contributors

Commits on Dec 13, 2024

  1. refactor: support vite

    * updated vite and vavite/multibuild versions
    
    * updated ts-morph as well
    
    * updated createRuntime with new v6 types
    
    * added the correct function calls and types
    Barabasbalazs authored Dec 13, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d767393 View commit details
  2. ci: add release workflow

    Julien-R44 committed Dec 13, 2024
    Copy the full SHA
    7fef50a View commit details
  3. Copy the full SHA
    1018ac7 View commit details
  4. Copy the full SHA
    e13980f View commit details
  5. Copy the full SHA
    34f84ce View commit details
  6. Copy the full SHA
    c355001 View commit details
  7. Copy the full SHA
    451e74c View commit details

Commits on Dec 14, 2024

  1. chore(release): 4.0.0-beta.0

    Julien-R44 committed Dec 14, 2024
    Copy the full SHA
    9da6385 View commit details
  2. chore: update dependencies

    Julien-R44 committed Dec 14, 2024
    Copy the full SHA
    7d39ff1 View commit details
  3. chore: set latest tag

    Julien-R44 committed Dec 14, 2024
    Copy the full SHA
    597f8db View commit details
  4. chore(release): 4.0.0

    Julien-R44 committed Dec 14, 2024
    Copy the full SHA
    7093143 View commit details
Showing with 81 additions and 36 deletions.
  1. +34 −0 .github/workflows/release.yml
  2. +40 −28 package.json
  3. +6 −7 src/vite.ts
  4. +1 −1 tsconfig.json
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: release
on: workflow_dispatch

permissions:
contents: write
id-token: write

jobs:
checks:
uses: ./.github/workflows/checks.yml
release:
needs: checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Init npm config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm install
- run: npm run release -- --ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68 changes: 40 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@adonisjs/vite",
"description": "Vite plugin for AdonisJS",
"version": "3.0.0",
"version": "4.0.0",
"engines": {
"node": ">=20.6.0"
},
@@ -40,45 +40,46 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@adonisjs/assembler": "^7.7.0",
"@adonisjs/core": "6.9.1",
"@adonisjs/assembler": "^7.8.2",
"@adonisjs/core": "6.16.0",
"@adonisjs/eslint-config": "^1.3.0",
"@adonisjs/prettier-config": "^1.3.0",
"@adonisjs/session": "^7.4.0",
"@adonisjs/prettier-config": "^1.4.0",
"@adonisjs/session": "^7.5.0",
"@adonisjs/shield": "^8.1.1",
"@adonisjs/tsconfig": "^1.3.0",
"@adonisjs/tsconfig": "^1.4.0",
"@japa/assert": "3.0.0",
"@japa/file-system": "^2.3.0",
"@japa/runner": "3.1.4",
"@japa/snapshot": "^2.0.5",
"@swc/core": "^1.5.24",
"@types/node": "^20.13.0",
"@japa/snapshot": "^2.0.6",
"@release-it/conventional-changelog": "^9.0.3",
"@swc/core": "^1.10.1",
"@types/node": "^22.10.2",
"@types/supertest": "^6.0.2",
"c8": "^9.1.0",
"c8": "^10.1.3",
"copyfiles": "^2.4.1",
"del-cli": "^5.1.0",
"edge.js": "^6.0.2",
"del-cli": "^6.0.0",
"edge.js": "^6.2.0",
"eslint": "^8.57.0",
"prettier": "^3.3.0",
"release-it": "^17.3.0",
"supertest": "^6.3.4",
"ts-morph": "^22.0.0",
"prettier": "^3.4.2",
"release-it": "^17.10.0",
"supertest": "^7.0.0",
"ts-morph": "^24.0.0",
"ts-node": "^10.9.2",
"tsup": "^8.0.2",
"typescript": "~5.4.5",
"vite": "^5.2.12"
"tsup": "^8.3.5",
"typescript": "~5.7.2",
"vite": "^6.0.3"
},
"dependencies": {
"@poppinss/utils": "^6.7.3",
"@vavite/multibuild": "^4.1.1",
"@poppinss/utils": "^6.8.3",
"@vavite/multibuild": "^5.1.0",
"edge-error": "^4.0.1",
"vite-plugin-restart": "^0.4.0"
"vite-plugin-restart": "^0.4.2"
},
"peerDependencies": {
"@adonisjs/core": "^6.3.0",
"@adonisjs/shield": "^8.0.0",
"edge.js": "^6.0.1",
"vite": "^5.1.4"
"vite": "^6.0.0"
},
"peerDependenciesMeta": {
"edge.js": {
@@ -107,8 +108,7 @@
},
"prettier": "@adonisjs/prettier-config",
"publishConfig": {
"access": "public",
"tag": "next"
"access": "public"
},
"c8": {
"reporter": [
@@ -140,14 +140,26 @@
},
"release-it": {
"git": {
"requireUpstream": true,
"commitMessage": "chore(release): ${version}",
"tagAnnotation": "v${version}",
"push": true,
"tagName": "v${version}"
},
"github": {
"release": true,
"releaseName": "v${version}",
"web": true
"release": true
},
"npm": {
"publish": true,
"skipChecks": true,
"tag": "latest"
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "angular"
}
}
}
}
}
13 changes: 6 additions & 7 deletions src/vite.ts
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@
import { join } from 'node:path'
import { readFileSync } from 'node:fs'
import { slash } from '@poppinss/utils'
import type { ViteRuntime } from 'vite/runtime'
import { ModuleRunner } from 'vite/module-runner'
import type {
InlineConfig,
MainThreadRuntimeOptions,
Manifest,
ModuleNode,
ViteDevServer,
ServerModuleRunnerOptions,
} from 'vite'

import { makeAttributes, uniqBy } from './utils.js'
@@ -431,14 +431,13 @@ export class Vite {
}

/**
* Create a runtime instance
* Create a serverModuleRunner instance
* Will not be available when running in production since
* it needs the Vite Dev server
*/
async createRuntime(options: MainThreadRuntimeOptions = {}): Promise<ViteRuntime> {
const { createViteRuntime } = await import('vite')

return createViteRuntime(this.#devServer!, options)
async createModuleRunner(options: ServerModuleRunnerOptions = {}): Promise<ModuleRunner> {
const { createServerModuleRunner } = await import('vite')
return createServerModuleRunner(this.#devServer!.environments.ssr, options)
}

/**
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,6 @@
"extends": "@adonisjs/tsconfig/tsconfig.package.json",
"compilerOptions": {
"rootDir": "./",
"outDir": "./build",
"outDir": "./build"
}
}