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

v3 #62

Draft
wants to merge 48 commits into
base: main
Choose a base branch
from
Draft

v3 #62

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
02e5052
Initial work for v3
rubenvanassche Jul 4, 2023
809cfac
Fix styling
rubenvanassche Jul 4, 2023
0e31e09
wip
rubenvanassche Jul 4, 2023
67445b0
Fix styling
rubenvanassche Jul 4, 2023
f917eb6
wip
rubenvanassche Jul 5, 2023
fcc502b
Fix styling
rubenvanassche Jul 5, 2023
84bcb18
wip
rubenvanassche Jul 17, 2023
1c46069
Fix styling
rubenvanassche Jul 17, 2023
08b571a
wip
rubenvanassche Jul 17, 2023
35024f0
wip
rubenvanassche Jul 27, 2023
5df83a3
Fix routes
rubenvanassche Jul 27, 2023
608c6d7
Fix styling
rubenvanassche Jul 27, 2023
3d5ff27
Updated routing
rubenvanassche Jul 27, 2023
3581d52
Fix styling
rubenvanassche Jul 27, 2023
4cfe740
Add visitor support
rubenvanassche Aug 1, 2023
d937040
Collections replacer
rubenvanassche Aug 1, 2023
40e9b98
Further code cleanup
rubenvanassche Aug 1, 2023
157584c
Fix styling
rubenvanassche Aug 1, 2023
b89615c
Config updates
rubenvanassche Aug 3, 2023
23d37e7
Fix styling
rubenvanassche Aug 3, 2023
0e6682b
Add some stuff
rubenvanassche Aug 7, 2023
4bfb40e
Switch . in routes
rubenvanassche Aug 8, 2023
658940e
wip
rubenvanassche Aug 9, 2023
0440e11
Better testing and importing
rubenvanassche Aug 9, 2023
6e379d2
Fix styling
rubenvanassche Aug 9, 2023
cbc39ab
wip
rubenvanassche Dec 1, 2023
3345c39
Fix styling
rubenvanassche Dec 1, 2023
c1fa741
Add Husky
rubenvanassche Mar 1, 2024
841f6d2
Fix styling
rubenvanassche Mar 1, 2024
60a0ed3
Use CS fixer
rubenvanassche Mar 1, 2024
feab27a
Fix styling
rubenvanassche Mar 1, 2024
3f32d0c
Typescript v3 updates
rubenvanassche Mar 15, 2024
0803e35
wip
rubenvanassche Mar 22, 2024
233961c
Update readme
rubenvanassche Apr 19, 2024
410c84d
wip
rubenvanassche Apr 19, 2024
3e6d125
wip
rubenvanassche Apr 25, 2024
ef88161
wip
rubenvanassche Apr 25, 2024
241795f
wip
rubenvanassche Jun 13, 2024
f75d83d
wip
rubenvanassche Jun 21, 2024
e987b0e
wip
rubenvanassche Jun 21, 2024
0ee5696
wip
rubenvanassche Jun 21, 2024
1c57886
wip
rubenvanassche Jun 21, 2024
6ee1c97
wip
rubenvanassche Aug 29, 2024
c28f1bf
wip
rubenvanassche Sep 20, 2024
d363866
wip
rubenvanassche Sep 27, 2024
b34ac59
wip
rubenvanassche Oct 4, 2024
8f4b2bc
Fix styling
rubenvanassche Oct 4, 2024
a0f02f3
Extra tests
rubenvanassche Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at https://editorconfig.org

root = true

[*]
Expand All @@ -14,5 +11,5 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

[*.yml]
[*.{yml,yaml}]
indent_size = 2
20 changes: 11 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.php.cs export-ignore
/.github export-ignore

/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml.dist export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.php-cs-fixer.dist.php export-ignore
/art export-ignore
/docs export-ignore
/UPGRADING.md export-ignore
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github: spatie
custom: https://spatie.be/open-source/support-us
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug Report
description: Report an Issue or Bug with the Package
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you expect to happen?
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: How to reproduce the bug
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
placeholder: When I do X I see Y.
validations:
required: true
- type: input
id: package-version
attributes:
label: Package Version
description: What version of our Package are you running? Please be as specific as possible
placeholder: 2.0.0
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you running? Please be as specific as possible
placeholder: 8.2.0
validations:
required: true
- type: dropdown
id: operating-systems
attributes:
label: Which operating systems does with happen with?
description: You may select more than one.
multiple: true
options:
- macOS
- Windows
- Linux
- type: textarea
id: notes
attributes:
label: Notes
description: Use this field to provide any other notes that you feel might be relevant to the issue.
validations:
required: false
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/spatie/typescript-transformer/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/spatie/typescript-transformer/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/spatie/typescript-transformer/security/policy
about: Learn how to notify us for sensitive bugs
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
32 changes: 32 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: dependabot-auto-merge
on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs.dist.php --allow-risky=yes
args: --config=.php-cs-fixer.dist.php --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
33 changes: 0 additions & 33 deletions .github/workflows/psalm.yml

This file was deleted.

25 changes: 12 additions & 13 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: run-tests
name: Tests

on: [push, pull_request]

Expand All @@ -8,31 +8,30 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.0, 8.1, 8.2]
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1]
stability: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/pest
5 changes: 4 additions & 1 deletion .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ on:
release:
types: [released]

permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: main

Expand Down
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.idea
.php_cs
.php_cs.cache
.phpunit.result.cache
build
composer.lock
vendor
coverage
.phpunit.result.cache
.idea
.php_cs.cache
docs
phpunit.xml
psalm.xml
vendor
.php-cs-fixer.cache

1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn lint-staged
7 changes: 1 addition & 6 deletions .php_cs.dist.php → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
Expand All @@ -26,11 +26,6 @@
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
Expand Down
Loading
Loading