Skip to content

Commit

Permalink
Merge pull request #50 from yaytrade/master
Browse files Browse the repository at this point in the history
feat(nova-4): Adds support for Nova v4.x
  • Loading branch information
adammparker authored Nov 12, 2022
2 parents 09c7421 + 6a0bb88 commit 50e3214
Show file tree
Hide file tree
Showing 36 changed files with 3,858 additions and 7,921 deletions.
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

registries:
composer-nova:
type: composer-repository
url: https://nova.laravel.com/
username: ${{ secrets.NOVA_USERNAME }}
password: ${{ secrets.NOVA_PASSWORD }}

updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
registries:
- composer-nova
open-pull-requests-limit: 0
rebase-strategy: "disabled"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 0
rebase-strategy: "disabled"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Setup Node.js 🖥️
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies 📦
run: yarn install

- name: Build for production 🏗️
run: yarn prod
39 changes: 39 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PHP Composer

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Run Lint (Laravel Pint) -> https://laravel.com/docs/pint
run: composer lint:check

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.idea
/vendor
/node_modules
/tools/pint/vendor
package-lock.json
composer.phar
composer.lock
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
20 changes: 0 additions & 20 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
preset: laravel

enabled:
- array_indentation
- combine_consecutive_unsets
- compact_nullable_typehint
- concat_with_spaces
- explicit_string_variable
- method_chaining_indentation
- no_empty_comment
- ordered_class_elements
- phpdoc_add_missing_param_annotation
- phpdoc_no_empty_return
- phpdoc_order
- phpdoc_separation
- property_separation
- short_list_syntax
- ternary_to_null_coalescing

disabled:
- concat_without_spaces
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ All notable changes to `nova-comments` will be documented in this file
- Codacy badge
- Removed `console.log`. Thanks to [@eugenevdm](https://github.com/eugenevdm) for the suggestion [#14](https://github.com/kirschbaum-development/nova-comments/pull/14).
- Navigation for Comments can now be hidden. Even though the PR wasn't accepted, thanks to [@0x15f](https://github.com/0x15f) for a good place to start.

## 4.0.0 - 2022-11-12

- Added support for Nova ^4.0
- Breaks support for older versions of Nova
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ This package contains an inline commenting form for any resource to easily add c

## Requirements

This Nova resource tool requires Nova 2.0 or higher.
This Nova resource tool requires Nova 4.0 or higher.
For older version of Nova, use the tagged version [1.0.2](https://github.com/kirschbaum-development/nova-comments/releases/tag/1.0.2)

## Installation

Expand Down
23 changes: 21 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
"name": "Brandon Ferens",
"email": "[email protected]",
"role": "Developer"
},
{
"name": "Andrey Mukhin",
"email": "[email protected]",
"role": "Contributor"
}
],
"require": {
"php": ">=7.1.0"
"php": ">=8.0",
"laravel/nova": "^4.0"
},
"autoload": {
"psr-4": {
Expand All @@ -39,5 +45,18 @@
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"scripts": {
"install:tools": [
"cd ./tools/pint && composer install"
],
"lint": [
"@install:tools",
"./tools/pint/vendor/bin/pint"
],
"lint:check":[
"@install:tools",
"./tools/pint/vendor/bin/pint --test -v"
]
}
}
2 changes: 0 additions & 2 deletions config/nova-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@

// Maximum length of comment in comments panel
'limit' => 100,

'date-format' => 'MMM DD, YYYY',
];
Empty file removed dist/css/field.css
Empty file.
1 change: 1 addition & 0 deletions dist/css/tool.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

99 changes: 0 additions & 99 deletions dist/js/field.js

This file was deleted.

Loading

0 comments on commit 50e3214

Please sign in to comment.