Skip to content

Commit 69262b6

Browse files
authored
initial source code push (#1)
1 parent 7306a8e commit 69262b6

29 files changed

+3829
-0
lines changed

.eslintrc.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
extends:
2+
- eslint:recommended
3+
- plugin:@typescript-eslint/recommended
4+
- prettier
5+
env:
6+
node: true
7+
es6: true
8+
mocha: true
9+
parser: '@typescript-eslint/parser'
10+
parserOptions:
11+
ecmaVersion: 2019
12+
rules:
13+
indent: off
14+
func-names: [error, never]
15+
no-shadow: off
16+
no-case-declarations: off
17+
no-param-reassign: off
18+
comma-dangle: off
19+
radix: off
20+
consistent-return: off
21+
no-prototype-builtins: off
22+
no-await-in-loop: off
23+
no-use-before-define: off
24+
no-restricted-syntax: off
25+
no-empty: off
26+
no-continue: off
27+
require-yield: off
28+
'@typescript-eslint/no-explicit-any': off
29+
'@typescript-eslint/no-non-null-assertion': off
30+
'@typescript-eslint/no-empty-function': off
31+
'@typescript-eslint/no-unused-vars': [warn, varsIgnorePattern: ^_]
32+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Common Setup for CI
2+
description: Reusable common setup for project's CI jobs
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- uses: actions/setup-node@v2
8+
with:
9+
node-version: '16.14.0'
10+
11+
- name: Get Node.js Version
12+
id: node_version
13+
run: |
14+
echo "::set-output name=version::$(node -v)"
15+
shell: bash
16+
17+
- name: Install pnpm
18+
run: npm install -g pnpm
19+
shell: bash
20+
21+
- name: Restore possibly cached dependencies
22+
id: cache-node-modules
23+
uses: actions/cache@v2
24+
with:
25+
path: ./node_modules
26+
key: node-modules-${{ runner.os }}-${{ steps.node_version.outputs.version }}-${{ hashFiles('./pnpm-lock.yaml') }}
27+
28+
- name: Install dependencies if weren't cached
29+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
30+
run: pnpm install --frozen-lockfile
31+
shell: bash
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
prettier_check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- uses: ./.github/actions/ci-common-setup
16+
17+
- name: Prettier check
18+
run: npx prettier --check "./src/**/*.{ts,js}"
19+
20+
lint_check:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
ref: ${{ github.head_ref }}
26+
27+
- uses: ./.github/actions/ci-common-setup
28+
29+
- name: Lint check
30+
run: npx eslint ./src --cache
31+
32+
run_tests:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
with:
37+
ref: ${{ github.head_ref }}
38+
39+
- uses: ./.github/actions/ci-common-setup
40+
41+
- name: Run tests
42+
run: pnpm run test
43+
44+
ts_test_build:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
with:
49+
ref: ${{ github.head_ref }}
50+
51+
- uses: ./.github/actions/ci-common-setup
52+
53+
- name: TypeScript test build
54+
run: pnpm run check-typings
55+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release new version
2+
3+
on:
4+
workflow_dispatch:
5+
# inputs:
6+
# dry_run:
7+
# type: boolean
8+
# description: Perform as a dry run
9+
10+
jobs:
11+
release_new_version:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Semantic Release
19+
id: semantic_release
20+
uses: cycjimmy/semantic-release-action@v3
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
with:
25+
semantic_version: 19.0.5
26+
dry_run: false
27+
extra_plugins: |
28+
@semantic-release/commit-analyzer
29+
@semantic-release/release-notes-generator
30+
@semantic-release/changelog@6.0.0
31+
@semantic-release/github
32+
@semantic-release/npm
33+
@semantic-release/git

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/dist
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
.vscode
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
.eslintcache
26+
27+
personal-stuff-to-keep

.mocharc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
spec: ./spec/**/*.spec.ts
2+
watch-files:
3+
- ./src/**/*.ts
4+
- ./spec/**/*.ts

.prettierrc.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
trailingComma: es5
2+
singleQuote: true
3+
semi: true
4+
arrowParens: avoid
5+
printWidth: 90

.releaserc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
"@semantic-release/github",
7+
"@semantic-release/npm",
8+
[
9+
"@semantic-release/git",
10+
{
11+
"assets": ["package.json", "CHANGELOG.md"],
12+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
13+
}
14+
]
15+
]
16+
}

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Dor Shtaif
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "iterified",
3+
"version": "0.0.0",
4+
"author": "Dor Shtaif <dorshtaif@gmail.com>",
5+
"license": "MIT",
6+
"repository": "https://github.com/shtaif/multerator",
7+
"description": "",
8+
"engineStrict": true,
9+
"sideEffects": false,
10+
"engines": {
11+
"node": ">=10.21.0"
12+
},
13+
"main": "./dist/cjs/index.js",
14+
"module": "./dist/esm/index.js",
15+
"types": "./dist/cjs/index.d.ts",
16+
"exports": {
17+
".": {
18+
"import": "./dist/esm/index.js",
19+
"require": "./dist/cjs/index.js",
20+
"default": "./dist/esm/index.js"
21+
}
22+
},
23+
"files": [
24+
"dist"
25+
],
26+
"scripts": {
27+
"test": "ts-mocha -p ./tsconfig-esm.json",
28+
"build": "rimraf ./dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && node ./scripts/mark-dist-package-module-types.js",
29+
"check-typings": "tsc --noEmit -p ./tsconfig-esm.json"
30+
},
31+
"devDependencies": {
32+
"@types/mocha": "^8.2.3",
33+
"@types/node": "^20.4.5",
34+
"@types/sinon": "^10.0.16",
35+
"@typescript-eslint/eslint-plugin": "^6.2.1",
36+
"@typescript-eslint/parser": "^6.2.1",
37+
"eslint": "^8.46.0",
38+
"eslint-config-prettier": "^8.9.0",
39+
"eslint-config-standard": "^17.1.0",
40+
"expect": "^29.6.2",
41+
"mocha": "^8.4.0",
42+
"prettier": "^3.0.0",
43+
"rimraf": "^5.0.1",
44+
"sinon": "^15.2.0",
45+
"ts-mocha": "^8.0.0",
46+
"typescript": "^5.1.6"
47+
}
48+
}

0 commit comments

Comments
 (0)