Skip to content

Commit

Permalink
chore: update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAegis committed Jul 24, 2023
1 parent 29214ea commit 968e73f
Show file tree
Hide file tree
Showing 18 changed files with 1,180 additions and 894 deletions.
89 changes: 46 additions & 43 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# managed-by-autotool

name: cicd

on:
Expand All @@ -7,11 +9,10 @@ on:
branches: '**'

env:
PAGES_DEPLOY_ARTIFACT_DIR: '.cache/typedoc'
PAGES_DEPLOY_ARTIFACT_BUILDING_JOB: 'typedoc'
TURBO_TOKEN: ${{ secrets.VERCEL_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_REMOTE_ONLY: true
BUILD_REASON: 'publish' # publint would like to see the .d.ts files

permissions:
contents: read
Expand All @@ -29,7 +30,7 @@ jobs:
strategy:
matrix:
node-version: [18.x]
lint-kind: [tsc, es, format, md, style, svelte, depcheck]
lint-kind: [tsc, es, md, format, style, svelte, depcheck]
steps:
- name: checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -70,27 +71,27 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
if: env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
if: vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
with:
fetch-depth: 1
- name: setup node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
if: env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
if: vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
with:
node-version: ${{ matrix.node-version }}
- name: pnpm setup
uses: pnpm/action-setup@v2
if: env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
if: vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
with:
run_install: false
- name: get pnpm store directory
id: pnpm-cache
if: env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
if: vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: cache
id: cache
if: env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
if: vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
uses: actions/cache@v3
with:
path: |
Expand All @@ -100,35 +101,35 @@ jobs:
restore-keys: |
${{ runner.os }}-
- name: install
if: env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
if: vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
run: pnpm install
- name: typedoc
if: env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
if: vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc'
run: pnpm run typedoc
- name: prepare pages (use index.html as 404.html)
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
run: |
cp ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}/index.html ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}/404.html
cp ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}/index.html ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}/404.html
- name: setup pages
uses: actions/configure-pages@v2
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
- name: upload artifact
uses: actions/upload-pages-artifact@v1
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'typedoc' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
with:
path: ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}
path: ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}
test:
name: test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -171,35 +172,36 @@ jobs:
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info
language: ${{ vars.CODACY_REPORT_LANGUAGE }}
- name: upload coverage result to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: coverage
- name: prepare pages (use index.html as 404.html)
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'test' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'test' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
run: |
cp ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}/index.html ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}/404.html
cp ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}/index.html ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}/404.html
- name: setup pages
uses: actions/configure-pages@v2
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'test' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'test' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
- name: upload artifact
uses: actions/upload-pages-artifact@v1
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'test' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'test' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
with:
path: ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}
path: ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}
build:
name: build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -237,37 +239,41 @@ jobs:
run: pnpm install
- name: build
env:
BASE_HREF: '/${{ github.event.repository.name }}/'
BASE_HREF: '/${{ github.event.repository.name }}'
PLATFORM: 'github-pages'
run: pnpm run build
- name: publint
run: pnpm run publint
- name: prepare pages (use index.html as 404.html)
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'build' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'build' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
run: |
cp ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}/index.html ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}/404.html
cp ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}/index.html ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}/404.html
- name: setup pages
uses: actions/configure-pages@v2
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'build' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'build' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
- name: upload artifact
uses: actions/upload-pages-artifact@v1
if: |
env.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'build' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
vars.PAGES_DEPLOY_ARTIFACT_BUILDING_JOB == 'build' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
with:
path: ${{ env.PAGES_DEPLOY_ARTIFACT_DIR }}
deploy:
name: deploy
path: ${{ vars.PAGES_DEPLOY_ARTIFACT_DIR }}
deploy-github-pages:
name: deploy github pages
if: |
github.ref_name == github.event.repository.default_branch &&
github.event_name != 'pull_request'
github.event_name != 'pull_request' &&
vars.PAGES_DEPLOY_ARTIFACT_DIR
runs-on: ubuntu-latest
needs: [build, test, lint, typedoc]
environment:
Expand All @@ -277,9 +283,6 @@ jobs:
- name: deploy to github pages
uses: actions/deploy-pages@v1
id: deployment
if: |
env.PAGES_DEPLOY_ARTIFACT_DIR != '' &&
env.PAGES_DEPLOY_ARTIFACT_DIR != null
collect:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -336,7 +339,7 @@ jobs:
- name: |
build ${{ matrix.package.package_name }}@${{ matrix.package.package_version }}
run: |
npx turbo run build-lib_ --filter="${{ matrix.package.package_name }}" --concurrency 16 --cache-dir=.cache/turbo
npx turbo run build-lib_ --force --filter="${{ matrix.package.package_name }}" --concurrency 16 --cache-dir=.cache/turbo
- name: |
publint ${{ matrix.package.package_name }}@${{ matrix.package.package_version }}
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,8 @@ vitest.config.ts.*
dist*
tmp*
.parcel-cache

## Platforms

# Vercel
.vercel
10 changes: 5 additions & 5 deletions fixtures/custom-bins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"lint:md_": "remark --frail --no-stdout --silently-ignore .",
"lint:tsc": "turbo run lint:tsc_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-custom-bins",
"lint:tsc_": "tsc --noEmit",
"all": "turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-custom-bins",
"all": "BUILD_REASON='publish' turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-custom-bins",
"format": "turbo run format_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-custom-bins",
"format_": "prettier --cache-location .cache/prettier --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss --write .",
"pakk": "pakk --srcDir source --binBaseDir cli --bins '**/*' --binIgnore ignore --staticExports static --dts --enabledFeatues export --enabledFeatues bin --enabledFeatues copy-license --enabledFeatues export-static ",
Expand Down Expand Up @@ -74,11 +74,11 @@
"pakk-fixture-custom-bins-postinstall": "./shims/postinstall.js"
},
"devDependencies": {
"@alexaegis/eslint-config-vitest": "^0.5.6",
"@alexaegis/ts": "^0.5.6",
"@types/node": "^20.4.2",
"@alexaegis/eslint-config-vitest": "^0.6.1",
"@alexaegis/ts": "^0.6.1",
"@types/node": "^20.4.4",
"@vitest/coverage-v8": "^0.33.0",
"vite": "^4.4.5",
"vite": "^4.4.7",
"vite-plugin-pakk": "workspace:^",
"vitest": "^0.33.0"
}
Expand Down
10 changes: 5 additions & 5 deletions fixtures/deep-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"lint:md_": "remark --frail --no-stdout --silently-ignore .",
"lint:tsc": "turbo run lint:tsc_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-deep-export",
"lint:tsc_": "tsc --noEmit",
"all": "turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-deep-export",
"all": "BUILD_REASON='publish' turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-deep-export",
"format": "turbo run format_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-deep-export",
"format_": "prettier --cache-location .cache/prettier --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss --write .",
"test": "turbo run test_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-deep-export",
Expand All @@ -55,11 +55,11 @@
}
},
"devDependencies": {
"@alexaegis/eslint-config-vitest": "^0.5.6",
"@alexaegis/ts": "^0.5.6",
"@types/node": "^20.4.2",
"@alexaegis/eslint-config-vitest": "^0.6.1",
"@alexaegis/ts": "^0.6.1",
"@types/node": "^20.4.4",
"@vitest/coverage-v8": "^0.33.0",
"vite": "^4.4.5",
"vite": "^4.4.7",
"vite-plugin-pakk": "workspace:^",
"vitest": "^0.33.0"
}
Expand Down
14 changes: 7 additions & 7 deletions fixtures/svelte-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"platform": "node",
"framework": "svelte",
"language": "ts",
"kind": "fixture"
"kind": "library"
},
"keywords": [
"javascript",
Expand Down Expand Up @@ -36,7 +36,7 @@
"lint:svelte_": "svelte-check --tsconfig ./tsconfig.json",
"lint:tsc": "turbo run lint:tsc_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-svelte-library",
"lint:tsc_": "tsc --noEmit",
"all": "turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-svelte-library",
"all": "BUILD_REASON='publish' turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-svelte-library",
"format": "turbo run format_ --concurrency 16 --cache-dir .cache/turbo --filter @pakk/fixture-svelte-library",
"format_": "prettier --cache-location .cache/prettier --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss --write .",
"start": "TARGET_ENV='local' vite",
Expand Down Expand Up @@ -66,17 +66,17 @@
"svelte": "~4.0.0"
},
"devDependencies": {
"@alexaegis/eslint-config-svelte": "^0.5.6",
"@alexaegis/eslint-config-vitest": "^0.5.6",
"@alexaegis/ts": "^0.5.6",
"@alexaegis/eslint-config-svelte": "^0.6.1",
"@alexaegis/eslint-config-vitest": "^0.6.1",
"@alexaegis/svelte-config": "^0.6.1",
"@alexaegis/ts": "^0.6.1",
"@pakk/cli": "workspace:^",
"@sveltejs/package": "^2.2.0",
"@types/node": "^20.4.2",
"@types/node": "^20.4.4",
"@vitest/coverage-v8": "^0.33.0",
"svelte": "^4.1.1",
"svelte-check": "^3.4.6",
"svelte-preprocess": "^5.0.4",
"vite": "^4.4.5",
"vitest": "^0.33.0"
}
}
14 changes: 3 additions & 11 deletions fixtures/svelte-library/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
// managed-by-autotool
import { libConfiguration } from '@alexaegis/svelte-config';

import sveltePreprocess from 'svelte-preprocess';

/** @type {import('@sveltejs/kit').Config} */
export default {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: sveltePreprocess(),
vitePlugin: {
inspector: {
holdMode: true,
toggleKeyCombo: 'shift',
},
},
...libConfiguration,
};
2 changes: 2 additions & 0 deletions fixtures/svelte-library/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"extends": "@alexaegis/ts/svelte",
"compilerOptions": {
"rootDir": "../../",
"allowJs": true,
"checkJs": true,
"outDir": "./dist/out-tsc"
},
"files": ["package.json", "../../package.json"],
Expand Down
Loading

0 comments on commit 968e73f

Please sign in to comment.