Skip to content

Commit

Permalink
chore: cleaned up test fixtures [skip-release]
Browse files Browse the repository at this point in the history
  • Loading branch information
freb97 committed Aug 15, 2024
1 parent 36647a8 commit cc0ce03
Show file tree
Hide file tree
Showing 41 changed files with 22 additions and 184 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
name: 'Release to NPM registry'
needs: [ test ]
runs-on: ubuntu-latest
if: |
github.event_name == 'push' &&
!contains(github.event.head_commit.message, '[skip-release]')
steps:
- uses: actions/checkout@v4
Expand All @@ -41,9 +44,7 @@ jobs:
- run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISHING_KEY }}
- run: npm install
- run: npm run dev:prepare
- run: npm run build

- name: Release
if: |
github.event_name == 'push' &&
!contains(github.event.head_commit.message, '[skip-release]')
run: npm run release:ci
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.0.9
- Updated eslint configuration
- Bumped dependencies
- Configured renovate bot

# 1.0.8
- Fixed code node handling - Thanks to @TRiBotWillB
- Bumped dependencies
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-strapi-blocks-renderer",
"version": "1.0.8",
"version": "1.0.9",
"description": "Renderer for the strapi CMS blocks text content element.",
"license": "MIT",
"repository": {
Expand All @@ -27,9 +27,10 @@
"scripts": {
"prepack": "nuxt-module-build build",
"dev": "npm run dev:basic",
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare",
"dev:prepare": "nuxt-module-build prepare && nuxi prepare playground/basic && nuxi prepare playground/custom",
"dev:basic": "nuxi dev playground/basic",
"dev:custom": "nuxi dev playground/custom",
"build": "nuxt-module-build build",
"release": "npm run lint && npm run test && npm run prepack && npm publish",
"release:ci": "npm run prepack && npm publish",
"lint:es": "eslint './**/*.{js,ts,vue}' --max-warnings=0",
Expand Down
2 changes: 2 additions & 0 deletions playground/basic/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default defineNuxtConfig({
compatibilityDate: '2024-08-15',

modules: [
'../../src/module',
],
Expand Down
1 change: 1 addition & 0 deletions playground/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"license": "MIT",
"scripts": {
"dev": "nuxi dev",
"prepare": "nuxi prepare",
"build": "nuxi build",
"generate": "nuxi generate"
},
Expand Down
2 changes: 1 addition & 1 deletion playground/basic/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import sampleNodes from '../../../src/runtime/.fixtures/sampleBlockNodes.json';
import sampleNodes from '#strapi-blocks-renderer/../.fixtures/sampleBlockNodes.json';
import type { BlockNode } from '#strapi-blocks-renderer/types';
Expand Down
2 changes: 2 additions & 0 deletions playground/custom/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default defineNuxtConfig({
compatibilityDate: '2024-08-15',

modules: [
'../../src/module',
],
Expand Down
1 change: 1 addition & 0 deletions playground/custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"license": "MIT",
"scripts": {
"dev": "nuxi dev",
"prepare": "nuxi prepare",
"build": "nuxi build",
"generate": "nuxi generate"
},
Expand Down
2 changes: 1 addition & 1 deletion playground/custom/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import sampleNodes from '#strapi-blocks-renderer/.fixtures/sampleBlockNodes.json';
import sampleNodes from '#strapi-blocks-renderer/../.fixtures/sampleBlockNodes.json';
import type { BlockNode } from '#strapi-blocks-renderer/types';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const fetchPage = async (): Promise<string> => {

describe('basic blocks text rendering', async (): Promise<void> => {
await setup({
rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)),
rootDir: fileURLToPath(new URL('../playground/basic', import.meta.url)),
});

it('renders the heading nodes', async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion test/custom.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const fetchPage = async (): Promise<string> => {

describe('custom blocks text rendering', async (): Promise<void> => {
await setup({
rootDir: fileURLToPath(new URL('./fixtures/custom', import.meta.url)),
rootDir: fileURLToPath(new URL('../playground/custom', import.meta.url)),
});

it('renders the custom heading nodes', async (): Promise<void> => {
Expand Down
3 changes: 0 additions & 3 deletions test/fixtures/basic/app.vue

This file was deleted.

5 changes: 0 additions & 5 deletions test/fixtures/basic/nuxt.config.ts

This file was deleted.

6 changes: 0 additions & 6 deletions test/fixtures/basic/package.json

This file was deleted.

9 changes: 0 additions & 9 deletions test/fixtures/basic/pages/index.vue

This file was deleted.

Binary file not shown.
3 changes: 0 additions & 3 deletions test/fixtures/custom/app.vue

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions test/fixtures/custom/nuxt.config.ts

This file was deleted.

14 changes: 0 additions & 14 deletions test/fixtures/custom/package.json

This file was deleted.

9 changes: 0 additions & 9 deletions test/fixtures/custom/pages/index.vue

This file was deleted.

Binary file not shown.

0 comments on commit cc0ce03

Please sign in to comment.