Skip to content

Commit

Permalink
fix: fixes after upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
dword-design committed Feb 18, 2020
1 parent c8b2072 commit 4f4bd8b
Show file tree
Hide file tree
Showing 14 changed files with 5,696 additions and 823 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: build

on:
push:
branches:
- '**'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node: [10, 12]
exclude:
- os: macos-latest
node: 10
- os: windows-latest
node: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: yarn --frozen-lockfile
- run: yarn test
- name: Coveralls
run: yarn dw-ci coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
COVERALLS_GIT_COMMIT: ${{ github.sha }}
COVERALLS_GIT_BRANCH: ${{ github.ref }}

release:
needs: test
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn --frozen-lockfile
- name: Push changed files
run: yarn dw-ci push-changed-files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn semantic-release
30 changes: 0 additions & 30 deletions .github/workflows/nodejs.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.DS_Store
/.cz.json
/.editorconfig
/.env
/.eslintrc.json
/.nyc_output
/.releaserc.json
/.vscode
/coverage
/dist
Expand Down
3 changes: 3 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM gitpod/workspace-full

RUN sudo apt-get update && sudo apt-get install -y libgtk-3-0 libx11-xcb1 libnss3 libxss1 libasound2
8 changes: 6 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
image:
file: .gitpod.Dockerfile

tasks:
- init: yarn
- init: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >>~/.npmrc
- init: yarn --frozen-lockfile

vscode:
extensions:
- karlito40.fix-irregular-whitespace@0.0.3:8jjyZYuYF6yW6nwsAiulrg==
- karlito40.fix-irregular-whitespace@0.0.3:8jjyZYuYF6yW6nwsAiulrg==
20 changes: 20 additions & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
{
"extends": [
":semanticCommits"
],
"packageRules": [
{
"packagePatterns": [
"*"
],
"semanticCommitType": "chore"
},
{
"depTypeList": [
"dependencies",
"devDependencies",
"peerDependencies",
"optionalDependencies"
],
"semanticCommitType": "fix"
}
],
"lockFileMaintenance": {
"enabled": true,
"schedule": "at any time"
Expand Down
18 changes: 7 additions & 11 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<!-- LICENSEFILE/ -->

<h1>License</h1>
# License

Unless stated otherwise all works are:

<ul><li>Copyright &copy; Sebastian Landwehr</li></ul>
Copyright &copy; Sebastian Landwehr <info@dword-design.de>

and licensed under:

<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul>
[MIT License](https://opensource.org/licenses/MIT)

## MIT License

<h2>MIT License</h2>
MIT License Copyright (c) <year> <copyright holders>

<pre>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</pre>

<!-- /LICENSEFILE -->
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45 changes: 19 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
<!-- TITLE/ -->

<h1>get-projectz-readme-section-regex</h1>

# get-projectz-readme-section-regex
<!-- /TITLE -->


<!-- BADGES/ -->
[![NPM version](https://img.shields.io/npm/v/get-projectz-readme-section-regex.svg)](https://npmjs.org/package/get-projectz-readme-section-regex)
![Linux macOS Windows compatible](https://img.shields.io/badge/os-linux%20%7C%C2%A0macos%20%7C%C2%A0windows-blue)

<span class="badge-npmversion"><a href="https://npmjs.org/package/get-projectz-readme-section-regex" title="View this project on NPM"><img src="https://img.shields.io/npm/v/get-projectz-readme-section-regex.svg" alt="NPM version" /></a></span>
<span class="badge-travisci"><a href="http://travis-ci.org/dword-design/get-projectz-readme-section-regex" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/dword-design/get-projectz-readme-section-regex/master.svg" alt="Travis CI Build Status" /></a></span>
<span class="badge-coveralls"><a href="https://coveralls.io/r/dword-design/get-projectz-readme-section-regex" title="View this project's coverage on Coveralls"><img src="https://img.shields.io/coveralls/dword-design/get-projectz-readme-section-regex.svg" alt="Coveralls Coverage Status" /></a></span>
<span class="badge-daviddm"><a href="https://david-dm.org/dword-design/get-projectz-readme-section-regex" title="View the status of this project's dependencies on DavidDM"><img src="https://img.shields.io/david/dword-design/get-projectz-readme-section-regex.svg" alt="Dependency Status" /></a></span>
<span class="badge-shields"><a href="https://img.shields.io/badge/renovate-enabled-brightgreen.svg"><img src="https://img.shields.io/badge/renovate-enabled-brightgreen.svg" /></a></span>
[![Build status](https://img.shields.io/github/workflow/status/dword-design/get-projectz-readme-section-regex/build)](https://github.com/dword-design/get-projectz-readme-section-regex/actions)
[![Coverage status](https://img.shields.io/coveralls/dword-design/get-projectz-readme-section-regex)](https://coveralls.io/github/dword-design/get-projectz-readme-section-regex)
[![Dependency status](https://img.shields.io/david/dword-design/get-projectz-readme-section-regex)](https://david-dm.org/dword-design/get-projectz-readme-section-regex)
![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/dword-design/get-projectz-readme-section-regex)
<!-- /BADGES -->


<!-- DESCRIPTION/ -->

Returns a regex for Projectz readme sections depending on the section name.

<!-- /DESCRIPTION -->


<!-- INSTALL/ -->
# Install

<h2>Install</h2>

<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>npm</h3></a>
<ul>
<li>Install: <code>npm install --save get-projectz-readme-section-regex</code></li>
<li>Import: <code>import * as pkg from ('get-projectz-readme-section-regex')</code></li>
<li>Require: <code>const pkg = require('get-projectz-readme-section-regex')</code></li>
</ul>
```bash
# NPM
$ npm install get-projectz-readme-section-regex

# Yarn
$ yarn add get-projectz-readme-section-regex
```
<!-- /INSTALL -->


## Usage
```js
const getProjectzReadmeSectionRegex = require('get-projectz-readme-section-regex')
Expand All @@ -50,16 +44,15 @@ getProjectzReadmeSectionRegex('BADGES').test('<!-- BADGES/ -->\nfoo bar baz<!--
getProjectzReadmeSectionRegex('BADGES').test('<!-- INSTALL -->')
// |> false
```
<!-- LICENSE/ -->

<h2>License</h2>
<!-- LICENSE/ -->
# License

Unless stated otherwise all works are:

<ul><li>Copyright &copy; Sebastian Landwehr</li></ul>
Copyright &copy; Sebastian Landwehr <info@dword-design.de>

and licensed under:

<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul>

[MIT License](https://opensource.org/licenses/MIT)
<!-- /LICENSE -->
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
"dist"
],
"scripts": {
"commit": "base commit",
"depgraph": "base depgraph",
"prepare": "base prepare",
"prepublishOnly": "base prepublishOnly",
"release": "base release",
"test": "base test"
},
"dependencies": {
Expand Down
31 changes: 31 additions & 0 deletions src/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import getProjectzReadmeSectionRegex from '.'
import { endent } from '@dword-design/functions'

export default {
known: () => {
expect(getProjectzReadmeSectionRegex('BADGES').test(endent`
foo
<!-- BADGES -->
bar
`)).toBeTruthy()
expect(getProjectzReadmeSectionRegex('BADGES').test(endent`
foo
<!-- BADGES/ -->
bar
<!-- /BADGES -->
`)).toBeTruthy()
},
unknown: () => {
expect(getProjectzReadmeSectionRegex('BADGES').test(endent`
foo
<!-- FOO -->
bar
`)).toBeFalsy()
expect(getProjectzReadmeSectionRegex('BADGES').test(endent`
foo
<!-- FOO/ -->
bar
<!-- /FOO -->
`)).toBeFalsy()
},
}
16 changes: 0 additions & 16 deletions test/known.test.js

This file was deleted.

16 changes: 0 additions & 16 deletions test/unknown.test.js

This file was deleted.

0 comments on commit 4f4bd8b

Please sign in to comment.