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

[WIP] Typescript continues... #78

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
04c30d9
fix npm scripts
PopGoesTheWza Jan 9, 2020
5803339
typescript definiton package
PopGoesTheWza Jan 10, 2020
f2a9b6e
better eslint prettier config
PopGoesTheWza Jan 10, 2020
f90bfb7
minor spell & lint fixes
PopGoesTheWza Jan 10, 2020
1024f7d
garbage collection
PopGoesTheWza Jan 10, 2020
99139cc
consistent meaningful var names and small enhancement
PopGoesTheWza Jan 10, 2020
522df2d
@stamp/types dependency
PopGoesTheWza Jan 10, 2020
ba74f78
removing .js that are compiled from .ts
PopGoesTheWza Jan 10, 2020
4f0e0c2
ignore compiled .js
PopGoesTheWza Jan 10, 2020
2a0bcae
whitelisting files for npm publish
PopGoesTheWza Jan 10, 2020
297de46
fix: remove obsolete `.npmignore` files
Mar 5, 2020
f2366f0
style: enable `xo` linter
Mar 5, 2020
8c497c9
style: repo has a logo
Mar 5, 2020
41a2d53
docs: linting & typos
Mar 5, 2020
399d342
fix: minor changes
Mar 5, 2020
aedd7ae
refactor: comply with `xo` linting rules
Mar 5, 2020
8efa71c
feat: improve type definitions
Mar 5, 2020
65a5798
Improve TS types as I know them. Fix broken types in init-property pa…
koresar May 13, 2020
870f5fd
fix: typing error
PopGoesTheWza Feb 17, 2021
63478af
chore: update dependencies
PopGoesTheWza Feb 17, 2021
d61242d
chore: xo for ts linting
PopGoesTheWza Feb 18, 2021
ace03e1
chore: update dependencies and cleanup
PopGoesTheWza Feb 18, 2021
a4a6a2c
chore: pass linting
PopGoesTheWza Feb 18, 2021
808bc45
ci: node 14
PopGoesTheWza Feb 18, 2021
3dcc61f
ci: fix bad character
PopGoesTheWza Feb 18, 2021
cea3392
ci: fix option
PopGoesTheWza Feb 18, 2021
11ed412
ci: ignore `.d.ts`
PopGoesTheWza Feb 18, 2021
c958791
chore: update dependencies
PopGoesTheWza Feb 18, 2021
4974945
feat: cleaner typing
PopGoesTheWza Feb 18, 2021
aabbb2b
chore: update dependencies
PopGoesTheWza Feb 19, 2021
76df688
refactor: refining stiling
PopGoesTheWza Feb 20, 2021
c8f60e6
revert: blunder
PopGoesTheWza Feb 20, 2021
009bd28
chore: update dependencies
PopGoesTheWza Feb 20, 2021
2e757ff
chore: xo linting config
PopGoesTheWza Feb 20, 2021
86a67a8
fix: import cleanup
PopGoesTheWza Feb 20, 2021
7969374
refactor: minor code cleanup
PopGoesTheWza Feb 20, 2021
e1fad03
refactor: styling
PopGoesTheWza Feb 20, 2021
ab30c3a
refactor: styling
PopGoesTheWza Feb 21, 2021
9c19717
chore: update dependencies
PopGoesTheWza Feb 25, 2021
562958e
refactor: styling
PopGoesTheWza Feb 25, 2021
086916c
chore: update dependencies
PopGoesTheWza Feb 28, 2021
548ce4e
chore: update dependencies
PopGoesTheWza Mar 4, 2021
4d2673e
chore: update dependencies
PopGoesTheWza Mar 5, 2021
4018683
refactor: intermediate types revision
PopGoesTheWza Mar 7, 2021
1bf54ff
test: fix linting
PopGoesTheWza Mar 7, 2021
f276109
chore: update dependencies
PopGoesTheWza Mar 13, 2021
79889e9
test: linting rukes update
PopGoesTheWza Mar 13, 2021
88e5e48
refactor: reorganized types
PopGoesTheWza Mar 13, 2021
d6b3b5a
chore: bump dependencies
PopGoesTheWza Apr 3, 2021
309d4c2
refactor: TODOs
PopGoesTheWza Apr 4, 2021
3a76684
chore: `xo` config
PopGoesTheWza Apr 4, 2021
3a18226
feat: don't export `InitializerContext`
PopGoesTheWza Apr 4, 2021
bacf37f
chore: minor type cast
PopGoesTheWza Apr 4, 2021
fe20f79
refactor: ComposeAttribute
PopGoesTheWza Apr 6, 2021
9975f7f
ci: move xo config to package.json
PopGoesTheWza Apr 12, 2021
f0990c1
chore: bump dependencies
PopGoesTheWza Apr 12, 2021
49447ea
refactor: cleanup
PopGoesTheWza Apr 12, 2021
2bf47b6
chore: bump dependencies
PopGoesTheWza Apr 14, 2021
293b38f
ci: suopport nodejs 16
PopGoesTheWza May 3, 2021
043a49f
chore: bump dependencies
PopGoesTheWza May 3, 2021
a4e2cb0
chore: linting
PopGoesTheWza May 3, 2021
f02a5d6
chore: bump dependencies
PopGoesTheWza May 25, 2021
de7b347
chore: bump dependencies
PopGoesTheWza Jun 2, 2021
480b108
chore: bump dependencies
PopGoesTheWza Aug 2, 2021
2cfa1b0
chore: bump dependencies
PopGoesTheWza Aug 9, 2021
0941d0b
chore: bump dependencies
PopGoesTheWza Aug 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
packages/check-compose
*.d.ts
packages/*
!packages/check-compose
packages/*/__test__/*
4 changes: 0 additions & 4 deletions .eslintignore-js

This file was deleted.

92 changes: 0 additions & 92 deletions .eslintrc-js.json

This file was deleted.

65 changes: 20 additions & 45 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,35 @@
{
"env": {
"es6": true,
"jest": true,
// "jest": true,
"node": true
},
"extends": [
"plugin:es/no-2017", // NodeJS 8 support
"eslint:recommended",
"airbnb-base",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jest/all",
// "plugin:jest/all",
"plugin:node/recommended",
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
"ecmaVersion": 2016 // NodeJS 8 support
},
"plugins": [
"@typescript-eslint",
"es", // should be unnecessary with drop of Node 8 or switch to Typescript
"import",
"jest", // relevancy to ensure correct unit tests to be evaluated
// "jest", // relevancy to ensure correct unit tests to be evaluated
"node",
"prefer-arrow",
"prettier"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
// use <root>/tsconfig.json
"typescript": {
"alwaysTryTypes": true // always try to resolve types under `<roo/>@types` directory even it doesn't contain any source code, like `@types/unist`
}
},
"node": {
"tryExtensions": [".ts", ".js", ".json"]
}
},
"reportUnusedDisableDirectives": true,
"rules": {
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/no-use-before-define": 1,

"class-methods-use-this": 1,
// "func-names": 0,
"func-names": "off",
"global-require": 1,
"guard-for-in": 1,
"max-classes-per-file": 0,
"max-classes-per-file": "off",
"no-array-constructor": 1,
"no-continue": 1,
"no-nested-ternary": 1,
Expand All @@ -76,10 +55,10 @@
"no-return-assign": 1,
"no-underscore-dangle": 1,
"no-unreachable": 1,
"no-unused-vars": 0,
"no-use-before-define": 0,
"no-unused-vars": 1,
"no-use-before-define": 1,
"prefer-destructuring": 1,
// "prefer-object-spread": 0,
"prefer-object-spread": 0,
"prefer-rest-params": 1,
"prefer-spread": 1,
"strict": 0,
Expand All @@ -89,29 +68,25 @@
// eslint-plugin-es - https://mysticatea.github.io/eslint-plugin-es/

// eslint-plugin-import rules - https://github.com/benmosher/eslint-plugin-import/blob/master/README.md
"import/extensions": ["error", { "ts": "never" }],
"import/no-dynamic-require": 1,
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": 0,

// eslint-plugin-jest - https://github.com/jest-community/eslint-plugin-jest/blob/master/README.md
"jest/expect-expect": 1,
"jest/no-test-return-statement": 1,
"jest/no-truthy-falsy": 1,
"jest/prefer-called-with": 1,
"jest/prefer-expect-assertions": 0,
"jest/require-to-throw-message": 1,
"jest/require-top-level-describe": 1,
"jest/no-export": 1,
// "jest/expect-expect": 1,
// "jest/no-test-return-statement": 1,
// "jest/no-truthy-falsy": 1,
// "jest/prefer-called-with": 1,
// "jest/prefer-expect-assertions": 0,
// "jest/require-to-throw-message": 1,
// "jest/require-top-level-describe": 1,
// "jest/no-export": 1,

// for reference. Might be useful with switch to Typescript
// eslint-plugin-jsdoc - https://github.com/gajus/eslint-plugin-jsdoc/blob/master/README.md

// eslint-plugin-node - https://github.com/mysticatea/eslint-plugin-node
"node/no-extraneous-import": ["error", { "allowModules": ["ts-essentials"] }],
"node/no-unpublished-require": 1,
"node/no-unsupported-features/es-syntax": 0,
"node/no-deprecated-api": 1,

"prettier/prettier": "error"
}
}
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto
*.js eol=lf
*.json eol=lf
*.md eol=lf
*.ts eol=lf
*.yml eol=lf
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ehthumbs.db
Thumbs.db



##### node.js
# Logs
logs
Expand Down Expand Up @@ -48,7 +47,6 @@ node_modules
# package-lock.json



##### Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
*.iml

Expand Down Expand Up @@ -95,8 +93,6 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties



##### VIM editor
[._]*.s[a-w][a-z]
[_]s[a-w][a-z]
Expand All @@ -107,3 +103,6 @@ Session.vim

# Typescript
*.tsbuildinfo
*.d.ts
packages/*/*.js
!.xo-config.js
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
packages/**.js
packages/**.d.ts

!packages/check-compose/*.js
!packages/types/**.d.ts
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
language: node_js
node_js:
- '10'
- '12'
- '14'
- '16'
before_script:
- export NODE_OPTIONS=--max_old_space_size=4096
- npm run build-clean
script:
- npm run ci
52 changes: 29 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,45 @@
# Stamp
# @Stamp Monorepo

_Mono repository for stamp related packages._

Documentation: https://stampit.js.org
Documentation: <https://stampit.js.org>

* `@stamp/arg-over-prop` - Assign properties passed to the stamp factory
* `@stamp/check-compose` - Command line tool to test your 'compose' function implementation
* `@stamp/collision` - Detect and manipulate method collisions
* `@stamp/compose` - Compose function implementation to create stamps
* `@stamp/configure` - Access configuration of your stamps anywhere
* `@stamp/core` - Core functions for creating stamps
* `@stamp/eventemittable` - Node.js' EventEmitter as a stamp
* `@stamp/fp-constructor` - Adds the Functional Programming capabilities to your stamps
* `@stamp/init-property` - Replaces properties which reference stamps with objects created from the stamps
* `@stamp/instanceof` - Enables `obj instanceof MyStamp` in ES6 environments
* `@stamp/is` - Various checking functions used with stamps
* `@stamp/it` - A nice, handy API implementation of the compose standard
* `@stamp/named` - (Re)Name a stamp factory function
* `@stamp/privatize` - Protect private properties
* `@stamp/required` - Insist on a method/property/staticProperty/configuration presence
* `@stamp/shortcut` - Adds handy shortcuts for stamp composition
## Packages

# Changelog
- `@stamp/arg-over-prop` - Assign properties passed to the stamp factory
- `@stamp/check-compose` - Command line tool to test your 'compose' function implementation
- `@stamp/collision` - Detect and manipulate method collisions
- `@stamp/compose` - Compose function implementation to create stamps
- `@stamp/configure` - Access configuration of your stamps anywhere
- `@stamp/core` - Core functions for creating stamps
- `@stamp/eventemittable` - NodeJS' EventEmitter as a stamp
- `@stamp/fp-constructor` - Adds the Functional Programming capabilities to your stamps
- `@stamp/init-property` - Replaces properties which reference stamps with objects created from the stamps
- `@stamp/instanceof` - Enables `obj instanceof MyStamp` in ES6 environments
- `@stamp/is` - Various type checking functions used with stamps
- `@stamp/it` - A nice, handy API implementation of the compose standard
- `@stamp/privatize` - Protect private properties
- `@stamp/required` - Insist on a method/property/staticProperty/configuration presence
- `@stamp/shortcut` - Adds handy static methods for simpler Stamp composition
- `@stamp/types` - Typescript definition of the Stamp specification

* **v0.x.x** were development versions.
* **v1.x.x** are production ready versions. No API changes comparing to v0.x.x.
### Deprecated

# Development
- `@stamp/named` - (Re)Name a stamp factory function

## Changelog

- **v0.x.x** were development versions.
- **v1.x.x** are production ready versions. No API changes comparing to v0.x.x.

## Development

## Install

Run `npm install` as usual followed by `npm run bootstrap` which creates local references to modules that require each other.

## Tests

The `npm test` will execute [Jest](https://github.com/facebook/jest) tests, and then [JSHint](https://github.com/jshint/jshint).
The `npm test` will execute [Jest](https://jestjs.io/) tests, and then [ESLint](https://eslint.org/).

The `npm test -- --watch` will watch file changes and execute tests as needed.
16 changes: 4 additions & 12 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@
"command": {
"publish": {
"access": "public",
"ignoreChanges": [
"__tests__/"
],
"npmClientArgs": [
"--access public"
]
"ignoreChanges": ["__tests__/"],
"npmClientArgs": ["--access public"]
}
},
"npmClientArgs": [
"--access public"
],
"packages": [
"packages/*"
]
"npmClientArgs": ["--access public"],
"packages": ["packages/*"]
}
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading