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: nuxt/module-builder
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.0
Choose a base ref
...
head repository: nuxt/module-builder
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.3.1
Choose a head ref
  • 13 commits
  • 16 files changed
  • 2 contributors

Commits on Apr 17, 2023

  1. chore(deps): lock file maintenance (#101)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 17, 2023
    Copy the full SHA
    4d7bcf0 View commit details

Commits on Apr 18, 2023

  1. chore(deps): update all non-major dependencies (#100)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 18, 2023
    Copy the full SHA
    b08d4ec View commit details
  2. chore: update fixture

    danielroe committed Apr 18, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    386ffa1 View commit details
  3. ci: stub example module

    danielroe committed Apr 18, 2023
    Copy the full SHA
    c3d25e5 View commit details
  4. Copy the full SHA
    eb31e6c View commit details
  5. Copy the full SHA
    5bf0fc2 View commit details
  6. Copy the full SHA
    90458ad View commit details

Commits on Apr 26, 2023

  1. chore(deps): update all non-major dependencies (#103)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 26, 2023
    Copy the full SHA
    3b8bc70 View commit details
  2. chore(deps): lock file maintenance (#105)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 26, 2023
    Copy the full SHA
    f20b4f3 View commit details

Commits on May 1, 2023

  1. chore(deps): lock file maintenance (#109)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored May 1, 2023
    Copy the full SHA
    16f112b View commit details
  2. Copy the full SHA
    796d6ab View commit details
  3. chore(deps): update all non-major dependencies (#107)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored May 1, 2023
    Copy the full SHA
    b2540a9 View commit details
  4. chore(release): 0.3.1

    danielroe committed May 1, 2023
    Copy the full SHA
    8827528 View commit details
Showing with 1,210 additions and 1,085 deletions.
  1. +2 −0 .github/workflows/ci.yml
  2. +1 −0 .gitignore
  3. +7 −0 CHANGELOG.md
  4. +2 −0 example/.nuxtrc
  5. +11 −5 example/package.json
  6. +8 −0 example/playground/app.vue
  7. +4 −0 example/playground/nuxt.config.ts
  8. +8 −0 example/playground/package.json
  9. +9 −2 example/src/module.ts
  10. +1 −2 example/src/runtime/plugin.ts
  11. +3 −0 example/tsconfig.json
  12. +12 −10 package.json
  13. +1,050 −1,066 pnpm-lock.yaml
  14. +3 −0 pnpm-workspace.yaml
  15. +1 −0 src/build.ts
  16. +88 −0 test/build.spec.ts
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -19,6 +19,8 @@ jobs:
node-version: 16
cache: 'pnpm'
- run: pnpm install
- run: pnpm -r dev:prepare
- run: pnpm lint
- run: pnpm test -- --coverage
- run: pnpm build
- run: pnpm example:build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,3 +6,4 @@ coverage
dist
types
package-lock.json
.nuxt
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.3.1](https://github.com/nuxt/module-builder/compare/v0.3.0...v0.3.1) (2023-05-01)


### Bug Fixes

* extend `nuxt/schema` as well ([796d6ab](https://github.com/nuxt/module-builder/commit/796d6ab161f753b3cce66ebf182f1f46b22f2a7c))

## [0.3.0](https://github.com/nuxt/module-builder/compare/v0.2.1...v0.3.0) (2023-04-11)

### [0.2.1](https://github.com/nuxt/module-builder/compare/v0.2.0...v0.2.1) (2022-11-16)
2 changes: 2 additions & 0 deletions example/.nuxtrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports.autoImport=false
typescript.includeWorkspace=true
16 changes: 11 additions & 5 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -2,8 +2,10 @@
"name": "my-module",
"license": "MIT",
"version": "1.0.0",
"type": "module",
"exports": {
".": {
"types": "./dist/types.d.ts",
"import": "./dist/module.mjs",
"require": "./dist/module.cjs"
},
@@ -15,15 +17,19 @@
"dist"
],
"scripts": {
"prepack": "nuxt-module-build"
"prepack": "jiti ../src/cli.ts",
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "jiti ../src/cli.ts --stub && nuxi prepare playground"
},
"dependencies": {
"@nuxt/kit": "^3.4.0"
"@nuxt/kit": "^3.4.3"
},
"devDependencies": {
"@nuxt/schema": "^3.4.0",
"@nuxt/module-builder": "..",
"nuxt": "^3.4.0"
"@types/node": "^18.16.3",
"@nuxt/module-builder": "workspace:*",
"@nuxt/schema": "^3.4.3",
"nuxt": "^3.4.3"
},
"build": {
"entries": [
8 changes: 8 additions & 0 deletions example/playground/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div>
Nuxt module playground!
</div>
</template>

<script setup>
</script>
4 changes: 4 additions & 0 deletions example/playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default defineNuxtConfig({
modules: ['../src/module'],
myModule: {}
})
8 changes: 8 additions & 0 deletions example/playground/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"private": true,
"name": "my-module-playground",
"dependencies": {
"my-module": "workspace:*",
"nuxt": "latest"
}
}
11 changes: 9 additions & 2 deletions example/src/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineNuxtModule } from '@nuxt/kit'
import { defineNuxtModule, addPlugin, createResolver } from '@nuxt/kit'

// Module options TypeScript interface definition
export interface ModuleOptions {
apiKey: string
}
@@ -21,8 +22,14 @@ export default defineNuxtModule<ModuleOptions>({
name: 'my-module',
configKey: 'myModule'
},
// Default configuration options of the Nuxt module
defaults: {
apiKey: ''
},
setup (_options, _nuxt) {}
setup (_options, _nuxt) {
const resolver = createResolver(import.meta.url)

// Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack`
addPlugin(resolver.resolve('./runtime/plugin'))
}
})
3 changes: 1 addition & 2 deletions example/src/runtime/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-ignore
import { defineNuxtPlugin } from '#app'

export default defineNuxtPlugin((_nuxtApp) => {
// eslint-disable-next-line no-console
console.log('Plugin by my-module!')
console.log('Plugin injected by my-module!')
})
3 changes: 3 additions & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./playground/.nuxt/tsconfig.json"
}
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/module-builder",
"version": "0.3.0",
"version": "0.3.1",
"description": "Complete solution to build Nuxt Modules",
"license": "MIT",
"type": "module",
@@ -25,24 +25,26 @@
"nuxt-module-build": "jiti ./src/cli.ts",
"prepack": "pnpm build",
"release": "pnpm test && standard-version && git push --follow-tags && npm publish",
"test": "pnpm lint"
"test": "pnpm vitest"
},
"dependencies": {
"consola": "^3.0.1",
"consola": "^3.1.0",
"mlly": "^1.2.0",
"mri": "^1.2.0",
"pathe": "^1.1.0",
"unbuild": "^1.2.0"
"unbuild": "^1.2.1"
},
"devDependencies": {
"@nuxt/kit": "^3.4.0",
"@nuxt/schema": "^3.4.0",
"@nuxt/kit": "^3.4.3",
"@nuxt/schema": "^3.4.3",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"@types/mri": "^1.1.1",
"@types/node": "^18.15.11",
"eslint": "^8.38.0",
"@types/node": "^18.16.3",
"@vitest/coverage-c8": "^0.30.1",
"eslint": "^8.39.0",
"jiti": "^1.18.2",
"nuxt": "^3.4.0",
"standard-version": "^9.5.0"
"nuxt": "^3.4.3",
"standard-version": "^9.5.0",
"vitest": "^0.30.1"
}
}
Loading