diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59f80e35..c817c6ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,59 +2,39 @@ name: CI on: push: - branches: - - main - + branches: ["main"] pull_request: - branches: - - main + types: [opened, synchronize] jobs: - lint: + build: + name: Build and Test + timeout-minutes: 15 runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 - - name: Set node - uses: actions/setup-node@v3 + - name: Check out code + uses: actions/checkout@v3 with: - node-version: 18.x - - - name: Setup - run: npm i -g @antfu/ni - - - name: Install - run: nci + fetch-depth: 2 - - name: Lint - run: nr lint - - test: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node: [18.x] - os: [ubuntu-latest, macos-latest] # windows-latest - fail-fast: false + - uses: pnpm/action-setup@v2.4.0 + with: + version: 8.9.0 - steps: - - uses: actions/checkout@v3 - - name: Set node ${{ matrix.node }} + - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} - - - name: Setup - run: npm i -g @antfu/ni + node-version: 18 + cache: 'pnpm' - - name: Install - run: nci + - run: corepack enable - - name: Prepare - run: nr prepare + - name: Install dependencies + run: pnpm install - name: Build - run: nr build + run: pnpm build - name: Test - run: nr test + run: pnpm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbad8cf2..87a73a61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,16 +7,44 @@ on: jobs: release: + permissions: + id-token: write + contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-node@v3 + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node + uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 18 + cache: pnpm + registry-url: 'https://registry.npmjs.org' - run: npx changelogithub env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Install Dependencies + run: pnpm i + + - name: PNPM build + run: pnpm run build + + - name: Publish to NPM + run: pnpm -r publish --access public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NPM_CONFIG_PROVENANCE: true + +# - name: Publish to VSCE & OVSX +# run: npm run publish +# working-directory: ./packages/vscode +# env: +# VSCE_TOKEN: ${{secrets.VSCE_TOKEN}} +# OVSX_TOKEN: ${{secrets.OVSX_TOKEN}} diff --git a/.turbo/cookies/0.cookie b/.turbo/cookies/0.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/1.cookie b/.turbo/cookies/1.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/10.cookie b/.turbo/cookies/10.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/11.cookie b/.turbo/cookies/11.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/12.cookie b/.turbo/cookies/12.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/13.cookie b/.turbo/cookies/13.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/14.cookie b/.turbo/cookies/14.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/15.cookie b/.turbo/cookies/15.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/16.cookie b/.turbo/cookies/16.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/17.cookie b/.turbo/cookies/17.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/18.cookie b/.turbo/cookies/18.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/19.cookie b/.turbo/cookies/19.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/2.cookie b/.turbo/cookies/2.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/20.cookie b/.turbo/cookies/20.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/21.cookie b/.turbo/cookies/21.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/22.cookie b/.turbo/cookies/22.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/23.cookie b/.turbo/cookies/23.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/24.cookie b/.turbo/cookies/24.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/25.cookie b/.turbo/cookies/25.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/26.cookie b/.turbo/cookies/26.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/27.cookie b/.turbo/cookies/27.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/28.cookie b/.turbo/cookies/28.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/29.cookie b/.turbo/cookies/29.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/3.cookie b/.turbo/cookies/3.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/30.cookie b/.turbo/cookies/30.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/31.cookie b/.turbo/cookies/31.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/32.cookie b/.turbo/cookies/32.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/33.cookie b/.turbo/cookies/33.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/34.cookie b/.turbo/cookies/34.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/35.cookie b/.turbo/cookies/35.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/36.cookie b/.turbo/cookies/36.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/37.cookie b/.turbo/cookies/37.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/38.cookie b/.turbo/cookies/38.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/39.cookie b/.turbo/cookies/39.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/4.cookie b/.turbo/cookies/4.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/40.cookie b/.turbo/cookies/40.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/41.cookie b/.turbo/cookies/41.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/42.cookie b/.turbo/cookies/42.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/43.cookie b/.turbo/cookies/43.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/44.cookie b/.turbo/cookies/44.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/45.cookie b/.turbo/cookies/45.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/46.cookie b/.turbo/cookies/46.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/47.cookie b/.turbo/cookies/47.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/48.cookie b/.turbo/cookies/48.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/49.cookie b/.turbo/cookies/49.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/5.cookie b/.turbo/cookies/5.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/50.cookie b/.turbo/cookies/50.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/51.cookie b/.turbo/cookies/51.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/52.cookie b/.turbo/cookies/52.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/53.cookie b/.turbo/cookies/53.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/54.cookie b/.turbo/cookies/54.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/6.cookie b/.turbo/cookies/6.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/7.cookie b/.turbo/cookies/7.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/8.cookie b/.turbo/cookies/8.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/9.cookie b/.turbo/cookies/9.cookie new file mode 100644 index 00000000..e69de29b diff --git a/examples/astro-svelte/package.json b/examples/astro-svelte/package.json index 4e7e54e6..c2381564 100644 --- a/examples/astro-svelte/package.json +++ b/examples/astro-svelte/package.json @@ -1,10 +1,10 @@ { - "name": "pinceau-astro-vue", + "name": "@pinceau/astro-svelte-example", "private": true, "scripts": { "dev": "astro dev --port=3000", "start": "astro dev --port=3000", - "build": "astro build", + "build:example": "astro build", "preview": "astro preview", "astro": "astro" }, diff --git a/examples/astro-vue/package.json b/examples/astro-vue/package.json index 564ce801..f727692c 100644 --- a/examples/astro-vue/package.json +++ b/examples/astro-vue/package.json @@ -1,10 +1,10 @@ { - "name": "pinceau-astro-vue", + "name": "@pinceau/astro-vue-example", "private": true, "scripts": { "dev": "astro dev --port=3000", "start": "astro dev --port=3000", - "build": "astro build", + "build:example": "astro build", "preview": "astro preview", "astro": "astro" }, diff --git a/examples/astro/package.json b/examples/astro/package.json index 46420cd6..70a84c23 100644 --- a/examples/astro/package.json +++ b/examples/astro/package.json @@ -1,10 +1,10 @@ { - "name": "pinceau-astro", + "name": "@pinceau/astro-example", "private": true, "scripts": { "dev": "astro dev --port=3000", "start": "astro dev --port=3000", - "build": "astro build", + "build:example": "astro build", "preview": "astro preview", "astro": "astro" }, diff --git a/examples/nuxt/package.json b/examples/nuxt/package.json index ac182a91..0877b2db 100644 --- a/examples/nuxt/package.json +++ b/examples/nuxt/package.json @@ -1,8 +1,8 @@ { - "name": "pinceau-nuxt", + "name": "@pinceau/nuxt-example", "private": true, "scripts": { - "build": "nuxi build", + "build:example": "nuxi build", "dev": "nuxi dev --port=3000", "preview": "nuxi preview" }, diff --git a/examples/shared/package.json b/examples/shared/package.json index 18530c81..078f16ac 100644 --- a/examples/shared/package.json +++ b/examples/shared/package.json @@ -1,6 +1,6 @@ { "name": "@pinceau/examples-shared", - "private": "true", + "private": true, "devDependencies": { "@pinceau/configs": "workspace:*" } diff --git a/examples/sveltekit/package.json b/examples/sveltekit/package.json index ef879ff4..12775494 100644 --- a/examples/sveltekit/package.json +++ b/examples/sveltekit/package.json @@ -1,9 +1,9 @@ { - "name": "pinceau-sveltekit", + "name": "@pinceau/sveltekit-example", "type": "module", "scripts": { "dev": "vite dev --port=3000", - "build": "vite build", + "build:example": "vite build", "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" diff --git a/examples/vite-lib/package.json b/examples/vite-lib/package.json index 9f1387ab..98425c9a 100644 --- a/examples/vite-lib/package.json +++ b/examples/vite-lib/package.json @@ -1,9 +1,9 @@ { - "name": "vite-lib", + "name": "@pinceau/vite-lib-example", "type": "module", "private": true, "scripts": { - "build": "vite build", + "build:example": "vite build", "dev": "vite --port=3000", "preview": "vite preview" }, diff --git a/examples/vite-lit/package.json b/examples/vite-lit/package.json index fb43cc7a..0ce0c3ee 100644 --- a/examples/vite-lit/package.json +++ b/examples/vite-lit/package.json @@ -1,5 +1,5 @@ { - "name": "pinceau-lit", + "name": "@pinceau/lit-example", "version": "0.0.0", "exports": { ".": "./dist/my-element.es.js" @@ -12,7 +12,7 @@ ], "scripts": { "dev": "vite --port=3000", - "build": "tsc && vite build" + "build:example": "tsc && vite build" }, "dependencies": { "lit": "^3.0.0" diff --git a/examples/vite-preact/package.json b/examples/vite-preact/package.json index 8863ebef..07ef83c2 100644 --- a/examples/vite-preact/package.json +++ b/examples/vite-preact/package.json @@ -1,11 +1,12 @@ { - "name": "vite-pinceau-preact", + "name": "@pinceau/vite-preact-example", + "private": true, "version": "0.0.0", "scripts": { "dev": "vite --port=3000", "dev-refresh": "cross-env USE_REFRESH=true vite --port=3000", - "build": "vite build", - "build-refresh": "cross-env USE_REFRESH=true vite build", + "build:example": "vite build", + "build:example-refresh": "cross-env USE_REFRESH=true vite build", "preview": "vite preview" }, "dependencies": { diff --git a/examples/vite-react/package.json b/examples/vite-react/package.json index ed5752f5..ca029fe0 100644 --- a/examples/vite-react/package.json +++ b/examples/vite-react/package.json @@ -1,11 +1,12 @@ { - "name": "vite-pinceau-react", + "name": "@pinceau/vite-react-example", + "private": true, "version": "0.0.0", "scripts": { "dev": "vite --port=3000", "dev-refresh": "cross-env USE_REFRESH=true vite --port=3000", - "build": "vite build", - "build-refresh": "cross-env USE_REFRESH=true vite build", + "build:example": "vite build", + "build:example-refresh": "cross-env USE_REFRESH=true vite build", "preview": "vite preview" }, "dependencies": { diff --git a/examples/vite-solid/package.json b/examples/vite-solid/package.json index c4a47e1b..c9f2af04 100644 --- a/examples/vite-solid/package.json +++ b/examples/vite-solid/package.json @@ -1,10 +1,11 @@ { - "name": "vite-pinceau-solid", + "name": "@pinceau/vite-solid-example", + "private": true, "version": "0.0.0", "license": "MIT", "scripts": { "dev": "vite --port=3000", - "build": "vite build", + "build:example": "vite build", "serve": "vite preview" }, "dependencies": { diff --git a/examples/vite-svelte/package.json b/examples/vite-svelte/package.json index 99eb3430..dcbe6c5e 100644 --- a/examples/vite-svelte/package.json +++ b/examples/vite-svelte/package.json @@ -1,10 +1,11 @@ { - "name": "vite-pinceau-svelte", + "name": "@pinceau/vite-svelte-example", + "private": true, "type": "module", "version": "0.0.0", "scripts": { "dev": "vite --port=3000", - "build": "vite build", + "build:example": "vite build", "serve": "vite preview", "check": "svelte-check --tsconfig ./tsconfig.json" }, diff --git a/examples/vite-vue/package.json b/examples/vite-vue/package.json index d288c962..a27dcdf1 100644 --- a/examples/vite-vue/package.json +++ b/examples/vite-vue/package.json @@ -1,9 +1,9 @@ { - "name": "vite-pinceau-vue", + "name": "@pinceau/vite-vue-example", "type": "module", "private": true, "scripts": { - "build": "vite build", + "build:example": "vite build", "dev": "vite --port=3000", "preview": "vite preview" }, diff --git a/package.json b/package.json index d5fd2dd3..424454bc 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "version": "1.0.0", "private": true, - "packageManager": "pnpm@8.6.0", + "packageManager": "pnpm@8.9.0", "description": "Make your