Skip to content

Commit

Permalink
refactor: Merge workspace into single package. (#362)
Browse files Browse the repository at this point in the history
* refactor repo into one package

* take pnpm for a test drive

* add tslib again

* fix dist path in action.yml

* split up core script. add eslint

* don't early return artifacts on macos

* up node version

* update deps

* fix change files

* rebuild dist
  • Loading branch information
FabianLars authored Feb 6, 2023
1 parent fa62927 commit c5c0e27
Show file tree
Hide file tree
Showing 71 changed files with 3,370 additions and 3,481 deletions.
14 changes: 2 additions & 12 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"getPublishedVersion": "npm view ${ pkgFile.pkg.name } version",
"prepublish": [
{
"command": "yarn",
"command": "pnpm install",
"dryRunCommand": true
},
{
Expand All @@ -29,18 +29,8 @@
}
},
"packages": {
"@tauri-apps/action-core": {
"path": "./packages/core",
"manager": "javascript",
"assets": [
{
"path": "./packages/core/tauri-apps-action-core-${ pkgFile.version }.tgz",
"name": "action-core-${ pkgFile.version }.tgz"
}
]
},
"action": {
"path": "./packages/action",
"path": "./",
"manager": "javascript",
"publish": [
"git tag v${ pkgFile.versionMajor } -f",
Expand Down
1 change: 0 additions & 1 deletion .changes/custom-target.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
"@tauri-apps/action-core": patch
"action": patch
---

Expand Down
2 changes: 1 addition & 1 deletion .changes/fix-linux-bundle-names.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tauri-apps/action-core": patch
'action': patch
---

Replace `_` and `.` with `-` in the product name on Linux.
3 changes: 1 addition & 2 deletions .changes/fix-vue-cli-plugin-tauri.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
"@tauri-apps/action-core": patch
"action": patch
'action': patch
---

Fixes usage with `vue-cli-plugin-tauri`.
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
env: {
node: true,
es2021: true,
},
extends: [
'prettier',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
},
};
2 changes: 1 addition & 1 deletion .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: covector status
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 7.x.x
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ jobs:
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 7.x.x
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: install example dependencies
run: yarn
run: pnpm install
working-directory: ./packages/action/__fixtures__/example
- uses: ./
env:
Expand Down
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,3 @@ target

# lockfiles, as a lib we don't need to lock
yarn.lock

# rollup output
dist
# but we want the action dist
!packages/action/dist
!packages/action/dist/**
!packages/action/__fixtures__/**/dist
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ outputs:
description: 'The paths of the generated artifacts'
runs:
using: 'node16'
main: 'packages/action/dist/index.js'
main: 'dist/index.js'
7 changes: 7 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

File renamed without changes.
49 changes: 42 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
{
"private": true,
"workspaces": [
"packages/core",
"packages/cli",
"packages/action"
"name": "tauri-action",
"version": "0.3.1",
"description": "Tauri GitHub Action",
"author": "Lucas Nogueira <lucas@tauri.studio>",
"license": "MIT",
"main": "dist/index.js",
"type": "module",
"scripts": {
"build": "ncc build src/index.ts -o dist -m",
"lint": "eslint src/**"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tauri-apps/tauri-action.git"
},
"keywords": [
"actions",
"tauri"
],
"dependencies": {
"@actions/core": "1.10.0",
"@actions/github": "5.1.1",
"@iarna/toml": "2.2.5",
"execa": "6.1.0",
"glob-gitignore": "^1.0.14",
"ignore": "5.2.4",
"json5": "2.2.3",
"string-argv": "0.3.1",
"tslib": "2.5.0"
},
"devDependencies": {
"covector": "0.7.3",
"prettier": "^2.8.0"
"@types/node": "16.18.11",
"@typescript-eslint/eslint-plugin": "5.49.0",
"@typescript-eslint/parser": "5.49.0",
"@vercel/ncc": "0.36.1",
"covector": "0.8.0",
"eslint": "8.33.0",
"eslint-config-prettier": "8.6.0",
"eslint-config-standard-with-typescript": "33.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-n": "15.6.1",
"eslint-plugin-promise": "6.1.1",
"prettier": "2.8.3",
"typescript": "4.9.4"
}
}
Loading

0 comments on commit c5c0e27

Please sign in to comment.