Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Sep 13, 2024
1 parent 5d6c680 commit aa91d43
Show file tree
Hide file tree
Showing 14 changed files with 295 additions and 587 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist/
/src/*-peg.mjs
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"experimentalTernaries": true
}
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,21 @@ Defaults to none.

List of files to search for prerequisites. Supported formats are:

* [META files](https://metacpan.org/pod/CPAN::Meta::Spec) in JSON and YAML
formats.
* [`cpmfile`](https://metacpan.org/pod/Module::cpmfile) in JSON and YAML
formats.
* [`cpanfile`](https://metacpan.org/dist/Module-CPANfile/view/lib/cpanfile.pod)
files as generated by [Module::CPANfile](https://metacpan.org/pod/Module::CPANfile)
or [Dist::Zilla::Plugin::CPANFile](https://metacpan.org/pod/Dist::Zilla::Plugin::CPANFile).
These files are parsed statically, files doing dynamic checks will not be
supported. These files must be named `cpanfile`.
* [Prereqs File](https://metacpan.org/pod/Dist::Zilla::Plugin::PrereqsFile)
in JSON and YAML formats. These files must named `prereqs.yml` or
`prereqs.json`.
* `Makefile` as emitted by
[ExtUtils::MakeMaker](https://metacpan.org/pod/ExtUtils::MakeMaker). This
was used to communicated dependencies before `MYMETA` files were invented.


- [META files](https://metacpan.org/pod/CPAN::Meta::Spec) in JSON and YAML
formats.
- [`cpmfile`](https://metacpan.org/pod/Module::cpmfile) in JSON and YAML
formats.
- [`cpanfile`](https://metacpan.org/dist/Module-CPANfile/view/lib/cpanfile.pod)
files as generated by [Module::CPANfile](https://metacpan.org/pod/Module::CPANfile)
or [Dist::Zilla::Plugin::CPANFile](https://metacpan.org/pod/Dist::Zilla::Plugin::CPANFile).
These files are parsed statically, files doing dynamic checks will not be
supported. These files must be named `cpanfile`.
- [Prereqs File](https://metacpan.org/pod/Dist::Zilla::Plugin::PrereqsFile)
in JSON and YAML formats. These files must named `prereqs.yml` or
`prereqs.json`.
- `Makefile` as emitted by
[ExtUtils::MakeMaker](https://metacpan.org/pod/ExtUtils::MakeMaker). This
was used to communicated dependencies before `MYMETA` files were invented.

Defaults to `MYMETA.json MYMETA.yml META.json META.yml Makefile cpanfile`.

Expand Down
36 changes: 18 additions & 18 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: "Get Prereqs from Dist"
description: "Extracts the prereqs from a local dist"
name: 'Get Prereqs from Dist'
description: 'Extracts the prereqs from a local dist'
branding:
icon: "arrow-right"
color: "blue"
icon: 'arrow-right'
color: 'blue'

inputs:
phases:
description: "The phases to get prerequisites for"
description: 'The phases to get prerequisites for'
required: false
default: "build test runtime"
default: 'build test runtime'
relationships:
description: "The relationships to get prerequisites for"
description: 'The relationships to get prerequisites for'
required: false
default: "requires"
default: 'requires'
features:
description: "The optional features to get prerequisites for"
description: 'The optional features to get prerequisites for'
required: false
default: ""
default: ''
sources:
description: "Source files to check for prerequisites"
description: 'Source files to check for prerequisites'
required: false
default: "MYMETA.json MYMETA.yml META.json META.yml Makefile cpanfile"
default: 'MYMETA.json MYMETA.yml META.json META.yml Makefile cpanfile'

outputs:
perl:
description: "The prerequisites formatted with a version in the syntax expected by cpanm or cpm"
description: 'The prerequisites formatted with a version in the syntax expected by cpanm or cpm'
prereqs:
description: "The prerequisites formatted with a version in the syntax expected by cpanm or cpm"
description: 'The prerequisites formatted with a version in the syntax expected by cpanm or cpm'
prereqs-no-version:
description: "The prerequisites formatted without a version as expected by CPAN.pm"
description: 'The prerequisites formatted without a version as expected by CPAN.pm'
prereqsJSON:
description: "The prerequisites as a JSON string with modules as the keys and versions as the values"
description: 'The prerequisites as a JSON string with modules as the keys and versions as the values'

runs:
using: "node20"
main: "dist/main.js"
using: 'node20'
main: 'dist/main.js'
10 changes: 5 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import globals from 'globals';
import js from '@eslint/js';
import mochaPlugin from 'eslint-plugin-mocha';

export default [
{
ignores: [
"src/cpanfile-peg.mjs",
],
ignores: ['src/*-peg.mjs', 'dist/'],
},
{
files: [ "src/**/*.mjs" ],
files: ['**/*.mjs'],
languageOptions: {
sourceType: "module",
sourceType: 'module',
},
},
{
Expand All @@ -19,4 +18,5 @@ export default [
},
},
js.configs.recommended,
mochaPlugin.configs.flat.recommended,
];
Loading

0 comments on commit aa91d43

Please sign in to comment.