Skip to content

Commit

Permalink
feat: #6 support vue2 / optional API (#7)
Browse files Browse the repository at this point in the history
* fix: composable の構成を変更 (optional api サポートと vue2 向け)

* fix: 微修正

* fix: 微調整

* fix: 微調整

* fix: 微調整

* fix: 微調整

* update: dependencies

* fix: structure

* fix: support vue2, vue-router4

* chore: ついで

* fix: script

* fix: nuxt 配下の playground を移設

* feat: [wip] 一旦 enclosure-nuxt で nuxt2  向けのビルドができるところまでは対応

* fix: 構成変更

* fix: vue2 の playground を頑張って作ってみたけど、 packages 周りでしんどくなったところまで

* fix: monorepo の分離

* fix: 構造変更と型安全にならない問題の対応

* feat: add example vue2.6

* feat: example/insider-vue2* 以外は動いた

* WIP

* fix: example でデバッグしながらライブラリの出力をきれいにした

* fix: enclosure-vue 2.7 で iframe に src が反映されない問題の対応

* fix: example の細かい対応漏れの修正

* fix: テスト用コンポーネントの更新と、見つかった細かい不具合の修正

* fix: layout 取得のテスト vue3 はできたが・・ vue2.7 x optionalがまだ

* test: add typecheck test

* fix: update yarn.lock

* fix: update yarn.lock

* fix: failed actions

* fix: failed actions

* fix: failed actions

* fix: failed actions

* fix: failed actions

* fix: failed actions

* fix: failed actions

* fix: failed actions

* fix: failed typecheck

* fix: types

* fix: types

* update misc

* fix: failed tests

* fix: syntax error

* fix: min

* versioning

---------

Co-authored-by: mewton <[email protected]>
  • Loading branch information
mew-ton and mewton authored Oct 22, 2023
1 parent fb82c32 commit b378e38
Show file tree
Hide file tree
Showing 181 changed files with 16,418 additions and 10,282 deletions.
6 changes: 6 additions & 0 deletions .changeset/funny-hounds-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@passerelle/enclosure-vue": minor
"@passerelle/insider-vue": minor
---

feat: support-vue2.7+, fix main feature interfaces.
6 changes: 2 additions & 4 deletions .changeset/sixty-rocks-tan.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
"@passerelle/enclosure-nuxt": major
"@passerelle/enclosure-vue": major
"@passerelle/insider-nuxt": major
"@passerelle/insider-vue": major
"@passerelle/enclosure-vue": minor
"@passerelle/insider-vue": minor
---

feat: main feature for vue3, nuxt3
20 changes: 0 additions & 20 deletions .github/actions/build-and-cache/action.yml

This file was deleted.

50 changes: 45 additions & 5 deletions .github/actions/init-node/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Install Dependencies and Cache
description: This composite action installs dependencies and restores from cache if available.
name: Install Dependencies and Build
description: Install dependencies and build

runs:
using: 'composite'
Expand All @@ -17,12 +17,52 @@ runs:
with:
path: |
./node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
./**/node_modules
./.yarn/cache
!./node_modules/.cache
!./**/node_modules/.cache
key: node-modules-${{ runner.os }}-${{ hashFiles('./**/yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
node-modules-${{ runner.os }}-${{ hashFiles('./**/yarn.lock') }}
node-modules-${{ runner.os }}-
node-modules--
- if: steps.cache_node_modules.outputs.cache-hit != 'true'
- name: cache and restore "build result"
id: cache_build_results
uses: actions/cache@v3
with:
path: |
./**/dist
./**/.nuxt
./**/node_modules/.cache/turbo
key: cache-build-results-${{ runner.os }}-${{ github.sha }}

- name: install [root] dependencies
run: yarn --immutable
shell: bash

- name: build
run: yarn build
shell: bash

# The directories under the example directory do not consider the strictness of yarn.lock
- name: install [examples/enclosure-vue3] dependencies
working-directory: ./examples/enclosure-vue3
run: yarn --immutable
shell: bash

- name: install [examples/enclosure-vue2.7] dependencies
working-directory: ./examples/enclosure-vue2.7
run: yarn --immutable
shell: bash

- name: install [examples/insider-vue3] dependencies
working-directory: ./examples/insider-vue3
run: yarn --immutable
shell: bash

- name: install [examples/insider-vue2.7] dependencies
working-directory: ./examples/insider-vue2.7
run: yarn --immutable
shell: bash

5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies
- name: Install dependencies and build
uses: ./.github/actions/init-node

- name: Build
uses: ./.github/actions/build-and-cache

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
Expand Down
68 changes: 56 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,78 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node

build:
name: 'Build'
test__code_spec:
name: 'Test: Code Specifigation'
runs-on: ubuntu-latest
needs:
- init__node
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node
- uses: ./.github/actions/build-and-cache
- run: yarn test

test__code_spec:
name: 'Test: Code Specifigation'
test__typecheck__enclosure_vue:
name: 'Test: [package/enclosure-vue] TypeCheck'
runs-on: ubuntu-latest
needs:
- build
- init__node
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node
- uses: ./.github/actions/build-and-cache
- run: yarn test
- run: yarn typecheck
working-directory: packages/enclosure-vue

test__typecheck:
name: 'Test: TypeCheck'
test__typecheck__insider_vue:
name: 'Test: [package/insider-vue] TypeCheck'
runs-on: ubuntu-latest
needs:
- build
- init__node
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node
- run: yarn typecheck
working-directory: packages/insider-vue

test__typecheck__example_enclosure_vue_3:
name: 'Test: [example/enclosure-vue3] TypeCheck'
runs-on: ubuntu-latest
needs:
- init__node
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node
- run: yarn typecheck
working-directory: ./examples/enclosure-vue3

test__typecheck__example_enclosure_vue_2_7:
name: 'Test: [example/enclosure-vue2.7] TypeCheck'
runs-on: ubuntu-latest
needs:
- init__node
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node
- run: yarn typecheck
working-directory: ./examples/enclosure-vue2.7

test__typecheck__example_insider_vue_3:
name: 'Test: [example/insider-vue3] TypeCheck'
runs-on: ubuntu-latest
needs:
- init__node
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node
- run: yarn typecheck
working-directory: ./examples/insider-vue3

test__typecheck__example_insider_vue_2_7:
name: 'Test: [example/insider-vue2.7] TypeCheck'
runs-on: ubuntu-latest
needs:
- init__node
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-node
- uses: ./.github/actions/build-and-cache
- run: yarn typecheck
working-directory: ./examples/insider-vue2.7
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
!.vscode/*.code-workspace

# Intellij idea
*.iml
.idea

# OSX
.DS_Store
.AppleDouble
.LSOverride
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


# Logs
logs
*.log
Expand Down Expand Up @@ -123,10 +147,15 @@ dist
.vscode-test

# yarn v2
examples/*/.yarn
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# turborepo
.turbo

# vite timestamp
vite.config.ts.timestamp-*
39 changes: 24 additions & 15 deletions .vscode/project.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"name": "#root"
},
{
"path": "../docs",
"name": "#documentation"
"path": "./_n",
"name": "___PACKAGES___"
},
{
"path": "../packages/enclosure-vue",
Expand All @@ -17,28 +17,36 @@
"name": "@passerelle/insider-vue"
},
{
"path": "../packages/enclosure-nuxt",
"name": "@passerelle/enclosure-nuxt"
"path": "./_e",
"name": "___EXAMPLES___"
},
{
"path": "../packages/insider-nuxt",
"name": "@passerelle/insider-nuxt"
"path": "../examples/enclosure-vue2.7",
"name": "#example/enclosure-vue2.7"
},
{
"path": "../packages/insider-nuxt",
"name": "@passerelle/insider-nuxt"
"path": "../examples/enclosure-vue3",
"name": "#example/enclosure-vue3"
},
{
"path": "../fixtures/playground-enclosure",
"name": "#fixtures/playground-enclosure"
"path": "../examples/insider-vue2.7",
"name": "#example/insider-vue2.7"
},
{
"path": "../fixtures/playground-insider",
"name": "#fixtures/playground-insider"
"path": "../examples/insider-vue3",
"name": "#example/insider-vue3"
},
{
"path": "../fixtures/playground-vue-components",
"name": "#fixtures/playground-vue-components"
"path": "./_f",
"name": "___FIXTURES___"
},
{
"path": "../fixtures/enclosure",
"name": "#fixtures/enclosure"
},
{
"path": "../fixtures/insider",
"name": "#fixtures/insider"
}
],
"settings": {
Expand All @@ -57,7 +65,8 @@
"editor.rulers": [150],
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"liveServer.settings.multiRootWorkspaceName": "#root"
},
"extensions": {
"recommendations": [
Expand Down
3 changes: 3 additions & 0 deletions examples/enclosure-vue2.7/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
nodeLinker: node-modules
yarnPath: ../../.yarn/releases/yarn-3.6.3.cjs
13 changes: 13 additions & 0 deletions examples/enclosure-vue2.7/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"/>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
24 changes: 24 additions & 0 deletions examples/enclosure-vue2.7/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "example-enclosure-vue2",
"private": true,
"type": "module",
"scripts": {
"dev": "vite . --port 5173",
"typecheck": "vue-tsc --noEmit --composite false"
},
"devDependencies": {
"@passerelle/enclosure-vue": "*",
"@vue/tsconfig": "^0.4.0",
"fixtures-enclosure": "*",
"vite": "^4.3.0",
"vite-plugin-vue2": "^2.0.3",
"vue": "~2.7.0",
"vue-router": "~3.6.5",
"vue-template-compiler": "~2.7.0",
"vue-tsc": "^1.6.5"
},
"resolutions": {
"@passerelle/enclosure-vue": "portal:../../packages/enclosure-vue",
"fixtures-enclosure": "portal:../../fixtures/enclosure"
}
}
Loading

0 comments on commit b378e38

Please sign in to comment.