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

[nuxt] add nuxt module #204

Merged
merged 23 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
75080ea
feat: add nuxt module
Dec 3, 2024
76d1056
fix: add changelogs
Dec 3, 2024
cc737ce
feat: import and setup stonecrop instance
Dec 3, 2024
f2343dd
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Dec 11, 2024
5a13335
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Dec 13, 2024
a9a7d45
fix: remove router requirement from stonecrop
Dec 13, 2024
451df1a
fix: add changelogs
Dec 13, 2024
94dc33e
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Dec 16, 2024
653664d
fix: scan doctype files
Dec 16, 2024
b43b977
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Dec 17, 2024
9763094
fix: render schema on page
Dec 17, 2024
2ce7945
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Dec 20, 2024
ffcc937
fix: check if router is already installed in Stonecrop
Dec 20, 2024
2ebdbc8
fix: throw error if conflict is found in route
Dec 20, 2024
d8ebd16
fix: implement server-side data fetching
Dec 20, 2024
d15b96c
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Dec 27, 2024
62a0096
fix: replace crypto uuid generation with randomly generated hash string
Dec 31, 2024
09d8dd5
fix: add changelogs
Dec 31, 2024
cc3afc6
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Jan 3, 2025
93c75d2
fix: reserve keys for module options
Jan 3, 2025
6184281
fix: toggle minor bump to version on release
Jan 8, 2025
b482717
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Jan 10, 2025
8979acd
Merge remote-tracking branch 'upstream/development' into feat-nuxt-st…
Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Linters
# https://github.com/marketplace/actions/prettier-check
# This action works with pull requests and pushes on the main branch

on:
pull_request:
push:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/nuxt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
push:
paths: [nuxt/**]
branches: [development]
pull_request:

jobs:
test:
name: Nuxt
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
cache-dependency-path: '**/config/rush/pnpm-lock.yaml'
registry-url: https://registry.npmjs.org/

- name: Rush Install
run: node common/scripts/install-run-rush.js install

- name: Prepare Playground
working-directory: nuxt/
run: node ../common/scripts/install-run-rushx.js dev:prepare

- name: Rush Build
run: node common/scripts/install-run-rush.js rebuild --verbose

- name: Run Tests
working-directory: nuxt/
run: node ../common/scripts/install-run-rushx.js test
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,11 @@ tsdoc-metadata.json

# XState generated files
**/*.typegen.ts

# Nuxt
.nuxt
.output
.data
.vercel_build_output
.build-*
.netlify
3 changes: 2 additions & 1 deletion atable/src/stores/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineStore } from 'pinia'
import { type CSSProperties, computed, ref } from 'vue'

import type { CellContext, TableColumn, TableConfig, TableDisplay, TableModal, TableRow } from '../types'
import { generateHash } from '../utils'

/**
* Create a table store
Expand All @@ -18,7 +19,7 @@ export const createTableStore = (initData: {
display?: TableDisplay[]
modal?: TableModal
}) => {
const id = initData.id || crypto.randomUUID()
const id = initData.id || generateHash()
const createStore = defineStore(`table-${id}`, () => {
// util functions
const createTableObject = () => {
Expand Down
4 changes: 4 additions & 0 deletions atable/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ export const isHtmlString = (htmlString: string) => {
const $document = new DOMParser().parseFromString(htmlString, 'text/html')
return Array.from($document.body.childNodes).some(node => node.nodeType === 1)
}

export const generateHash = (length = 8) => {
return Array.from({ length }, () => Math.floor(Math.random() * 16).toString(16)).join('')
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/atable",
"comment": "replace crypto uuid generation with randomly generated hash string",
"type": "patch"
}
],
"packageName": "@stonecrop/atable"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/nuxt",
"comment": "add Nuxt module",
"type": "minor"
}
],
"packageName": "@stonecrop/nuxt"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/stonecrop",
"comment": "remove router requirement for Stonecrop plugin",
"type": "patch"
}
],
"packageName": "@stonecrop/stonecrop"
}
36 changes: 36 additions & 0 deletions common/config/rush/browser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@
"name": "@monaco-editor/loader",
"allowedCategories": [ "prototype" ]
},
{
"name": "@nuxt/devtools",
"allowedCategories": [ "prototype" ]
},
{
"name": "@nuxt/kit",
"allowedCategories": [ "prototype" ]
},
{
"name": "@nuxt/module-builder",
"allowedCategories": [ "prototype" ]
},
{
"name": "@nuxt/schema",
"allowedCategories": [ "prototype" ]
},
{
"name": "@nuxt/test-utils",
"allowedCategories": [ "prototype" ]
},
{
"name": "@rushstack/heft",
"allowedCategories": [ "prototype", "utilities" ]
Expand Down Expand Up @@ -142,6 +162,10 @@
"name": "graphql-request",
"allowedCategories": [ "utilities" ]
},
{
"name": "h3",
"allowedCategories": [ "prototype" ]
},
{
"name": "histoire",
"allowedCategories": [ "prototype", "utilities" ]
Expand Down Expand Up @@ -170,10 +194,22 @@
"name": "mqtt",
"allowedCategories": [ "prototype" ]
},
{
"name": "nitropack",
"allowedCategories": [ "prototype" ]
},
{
"name": "node-sass",
"allowedCategories": [ "prototype" ]
},
{
"name": "nuxi",
"allowedCategories": [ "prototype" ]
},
{
"name": "nuxt",
"allowedCategories": [ "prototype" ]
},
{
"name": "onscan.js",
"allowedCategories": [ "prototype" ]
Expand Down
Loading
Loading