Skip to content

Commit

Permalink
💥 Remove deprecated functions
Browse files Browse the repository at this point in the history
Build-in object function moves to `core-fn` project

BREAKING CHANGE: is * function migrates to is-valid project

Closes #112
  • Loading branch information
TomokiMiyauci committed Jun 28, 2021
1 parent 98d6a98 commit 6b9504b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 95 deletions.
87 changes: 43 additions & 44 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,52 @@ export { constructorName } from './src/constructorName.ts'
export { dec } from './src/dec.ts'
export { defaultTo } from './src/defaultTo.ts'
export { divide } from './src/divide.ts'
export { endsWith } from './src/endsWith.ts'
export { entries } from './src/entries.ts'
// export { endsWith } from './src/endsWith.ts'
// export { entries } from './src/entries.ts'
export { equal } from './src/equal.ts'
export { F } from './src/F.ts'
export type { First } from './src/first.ts'
export { first } from './src/first.ts'
// export type { First } from './src/first.ts'
// export { first } from './src/first.ts'
export type { FlattenDeep } from './src/flattenDeep.ts'
export { flattenDeep } from './src/flattenDeep.ts'
export { gt } from './src/gt.ts'
export { gte } from './src/gte.ts'
export { has } from './src/has.ts'
export { hasPath } from './src/hasPath.ts'
// export { hasPath } from './src/hasPath.ts'
export type { Head } from './src/head.ts'
export { head } from './src/head.ts'
export { identity } from './src/identity.ts'
export { ifElse } from './src/ifElse.ts'
export { ifElseFn } from './src/ifElseFn.ts'
export { inc } from './src/inc.ts'
export { includes } from './src/includes.ts'
// export { includes } from './src/includes.ts'
export { init } from './src/init.ts'
export { isArray } from './src/isArray.ts'
export { isBigint } from './src/isBigint.ts'
export { isBoolean } from './src/isBoolean.ts'
export { isEmpty } from './src/isEmpty.ts'
export { isFunction } from './src/isFunction.ts'
export { isJSONObject } from './src/isJSONObject.ts'
export { isLength0 } from './src/isLength0.ts'
export { isNaN } from './src/isNaN.ts'
export { isNil } from './src/isNil.ts'
export { isNill } from './src/isNill.ts'
export { isNull } from './src/isNull.ts'
export { isNumber } from './src/isNumber.ts'
export { isObject } from './src/isObject.ts'
export { isPrimitive } from './src/isPrimitive.ts'
export { isString } from './src/isString.ts'
export { isSymbol } from './src/isSymbol.ts'
export { isUndefined } from './src/isUndefined.ts'
// export { isArray } from './src/isArray.ts'
// export { isBigint } from './src/isBigint.ts'
// export { isBoolean } from './src/isBoolean.ts'
// export { isEmpty } from './src/isEmpty.ts'
// export { isFunction } from './src/isFunction.ts'
// export { isJSONObject } from './src/isJSONObject.ts'
// export { isLength0 } from './src/isLength0.ts'
// export { isNaN } from './src/isNaN.ts'
// export { isNil } from './src/isNil.ts'
// export { isNill } from './src/isNill.ts'
// export { isNull } from './src/isNull.ts'
// export { isNumber } from './src/isNumber.ts'
// export { isObject } from './src/isObject.ts'
// export { isPrimitive } from './src/isPrimitive.ts'
// export { isString } from './src/isString.ts'
// export { isSymbol } from './src/isSymbol.ts'
// export { isUndefined } from './src/isUndefined.ts'
export { K } from './src/K.ts'
export { keys } from './src/keys.ts'
// export { keys } from './src/keys.ts'
export type { Last } from './src/last.ts'
export { last } from './src/last.ts'
export { length } from './src/length.ts'
export { lowerCase } from './src/lowerCase.ts'
// export { length } from './src/length.ts'
// export { lowerCase } from './src/lowerCase.ts'
export { lt } from './src/lt.ts'
export { lte } from './src/lte.ts'
export { map } from './src/map.ts'
// export { map } from './src/map.ts'
export { multiply } from './src/multiply.ts'
export { N } from './src/N.ts'
export { NN } from './src/NN.ts'
Expand All @@ -65,39 +65,38 @@ export { pipe } from './src/pipe.ts'
export { prepend } from './src/prepend.ts'
export { product } from './src/product.ts'
export { props } from './src/props.ts'
export type { Replace } from './src/replace.ts'
export { replace } from './src/replace.ts'
export type { ReplaceAll } from './src/replaceAll.ts'
export { replaceAll } from './src/replaceAll.ts'
export { reverse } from './src/reverse.ts'
export { slice } from './src/slice.ts'
export { startsWith } from './src/startsWith.ts'
// export type { Replace } from './src/replace.ts'
// export { replace } from './src/replace.ts'
// export type { ReplaceAll } from './src/replaceAll.ts'
// export { replaceAll } from './src/replaceAll.ts'
// export { reverse } from './src/reverse.ts'
// export { slice } from './src/slice.ts'
// export { startsWith } from './src/startsWith.ts'
export { subtract } from './src/subtract.ts'
export { sum } from './src/sum.ts'
export { T } from './src/T.ts'
export { tail } from './src/tail.ts'
export { take } from './src/take.ts'
export { takeLast } from './src/takeLast.ts'
export { tap } from './src/tap.ts'
export { test } from './src/test.ts'
export type { Trim } from './src/trim.ts'
export { trim } from './src/trim.ts'
export type { TrimLeft } from './src/trimLeft.ts'
export { trimLeft } from './src/trimLeft.ts'
export type { TrimRight } from './src/trimRight.ts'
export { trimRight } from './src/trimRight.ts'
// export { test } from './src/test.ts'
// export type { Trim } from './src/trim.ts'
// export { trim } from './src/trim.ts'
// export type { TrimLeft } from './src/trimLeft.ts'
// export { trimLeft } from './src/trimLeft.ts'
// export type { TrimRight } from './src/trimRight.ts'
// export { trimRight } from './src/trimRight.ts'
export { tryCatch } from './src/tryCatch.ts'
export type {
AnyFn,
Arity1Fn,
Empty,
Falsy,
FalsyLike,
Ord,
Primitive,
Space
} from './src/types/index.ts'
export { uniq } from './src/uniq.ts'
export { upperCase } from './src/upperCase.ts'
export { values } from './src/values.ts'
// export { upperCase } from './src/upperCase.ts'
// export { values } from './src/values.ts'
export { xor } from './src/xor.ts'
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "fonction",
"description": "A modern practical functional library",
"version": "1.10.0-beta.1",
"main": "dist/index.umd.js",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"types": "dist/index.es.d.ts",
"exports": {
".": {
"import": "./dist/index.es.js",
"require": "./dist/index.umd.js"
"require": "./dist/index.cjs.js"
}
},
"sideEffects": false,
Expand All @@ -32,17 +32,17 @@
"@commitlint/cli": "^12.0.1",
"@microsoft/api-documenter": "^7.13.6",
"@microsoft/api-extractor": "^7.15.1",
"@rollup/plugin-node-resolve": "^13.0.0",
"@miyauci/is-valid": "^1.0.0-beta.15",
"@rollup/plugin-replace": "^2.4.2",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/fs-extra": "^9.0.11",
"@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0",
"@wessberg/rollup-plugin-ts": "^1.3.11",
"arithmetic4": "^2.0.0",
"commitizen": "^4.2.3",
"commitlint-config-gitmoji": "^2.2.3",
"core-fn": "^1.0.0-beta.1",
"cz-emoji": "^1.3.1",
"eslint": "^7.23.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
Expand All @@ -52,7 +52,6 @@
"fonction": "^1.3.0",
"fs-extra": "^10.0.0",
"husky": "^6.0.0",
"lauqe": "^1.5.0",
"markdown-it-attrs": "^4.0.0",
"prettier": "^2.2.1",
"rollup": "^2.45.1",
Expand Down Expand Up @@ -91,13 +90,14 @@
},
"browserslist": [
"> 0.5%",
"Firefox ESR",
"last 1 versions",
"not dead",
"not IE 11",
"last 1 version",
"not IE <= 11",
"not ie_mob <= 11",
"node 14"
],
"dependencies": {
"curry-rice": "^1.0.0"
"arithmetic4": "^2.0.0",
"curry-rice": "^1.0.0",
"lauqe": "^1.5.0"
}
}
15 changes: 8 additions & 7 deletions rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { nodeResolve } from '@rollup/plugin-node-resolve'
import replace from '@rollup/plugin-replace'
import ts from '@wessberg/rollup-plugin-ts'
import { resolve } from 'path'
import dts from 'rollup-plugin-dts'
import { terser } from 'rollup-plugin-terser'

import { main, module } from './package.json'
import { dependencies, main, module } from './package.json'

const baseDir = resolve(__dirname)
const outputDir = resolve(baseDir, 'dist')
Expand All @@ -20,6 +19,7 @@ const replaceOption = {
}
const banner =
'/*! Copyright (c) 2021-present the Fonction authors. All rights reserved. MIT license. */'
const external = Object.keys(dependencies)

const config = [
{
Expand All @@ -29,22 +29,21 @@ const config = [
replace(replaceOption),
ts({
transpiler: 'babel',
browserslist: ['defaults', 'node 6', 'supports es6-module'],
tsconfig: (resolvedConfig) => ({
...resolvedConfig,
declaration: false
})
}),
,
nodeResolve(),
terser()
],

external,

output: {
file: main,
format: 'umd',
format: 'cjs',
sourcemap: true,
name: 'F',
banner
}
},
Expand All @@ -55,10 +54,11 @@ const config = [
ts({
transpiler: 'babel'
}),
nodeResolve(),
terser()
],

external,

output: {
file: module,
format: 'es',
Expand All @@ -69,6 +69,7 @@ const config = [
{
input: declareFilePath,
output: { file: declareFilePath },

plugins: [
dts({
respectExternal: true,
Expand Down
48 changes: 14 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,13 @@
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz#3b0efb6d3903bd49edb073696f60e90df08efb26"
integrity sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==

"@miyauci/is-valid@^1.0.0-beta.15":
version "1.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@miyauci/is-valid/-/is-valid-1.0.0-beta.15.tgz#7af55c0f0ab5fa41ff784d0eac788782ba143ccd"
integrity sha512-ZF8du4N3uD02Q5CoHOz53d6FW2U/sl8GUvIUUP0GU94RFCR3ZvQ2VWajB8+gGsa1TGXQBCbLdhO835ajpHeDFA==
dependencies:
fonction "^1.8.0-beta.6"

"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
Expand Down Expand Up @@ -1534,18 +1541,6 @@
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.12.tgz#431ec342a7195622f86688bbda82e3166ce8cb28"
integrity sha512-6RglhutqrGFMO1MNUXp95RBuYIuc8wTnMAV5MUhLmjTOy78ncwOw7RgeQ/HeymkKXRhZd0s2DNrM1rL7unk3MQ==

"@rollup/plugin-node-resolve@^13.0.0":
version "13.0.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.0.tgz#352f07e430ff377809ec8ec8a6fd636547162dc4"
integrity sha512-41X411HJ3oikIDivT5OKe9EZ6ud6DXudtfNrGbC4nniaxx2esiWjkLOzgnZsWq1IM8YIeL2rzRGLZLBjlhnZtQ==
dependencies:
"@rollup/pluginutils" "^3.1.0"
"@types/resolve" "1.17.1"
builtin-modules "^3.1.0"
deepmerge "^4.2.2"
is-module "^1.0.0"
resolve "^1.19.0"

"@rollup/plugin-replace@^2.4.2":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz#a2d539314fbc77c244858faa523012825068510a"
Expand Down Expand Up @@ -1793,13 +1788,6 @@
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==

"@types/resolve@1.17.1":
version "1.17.1"
resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6"
integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==
dependencies:
"@types/node" "*"

"@types/retry@^0.12.0":
version "0.12.0"
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d"
Expand Down Expand Up @@ -2428,11 +2416,6 @@ buffer@^5.5.0:
base64-js "^1.3.1"
ieee754 "^1.1.13"

builtin-modules@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887"
integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==

builtins@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
Expand Down Expand Up @@ -2865,6 +2848,13 @@ convert-source-map@^1.7.0:
dependencies:
safe-buffer "~5.1.1"

core-fn@^1.0.0-beta.1:
version "1.0.0-beta.1"
resolved "https://registry.yarnpkg.com/core-fn/-/core-fn-1.0.0-beta.1.tgz#bcd5354d2368fae586323b9f4efc3741aed6ed4f"
integrity sha512-3tlSWwdK8+1m9TXD7A/p686qih7aygNlZ5vR2YEolWBXzXGBywMB6ef/jPQSiJ6m5K5UTVkVp3KrhnTmHFbKWg==
dependencies:
curry-rice "^1.0.0"

core-js-compat@^3.9.0, core-js-compat@^3.9.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.10.1.tgz#62183a3a77ceeffcc420d907a3e6fc67d9b27f1c"
Expand Down Expand Up @@ -3017,11 +3007,6 @@ deep-is@^0.1.3:
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=

deepmerge@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==

defaults@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
Expand Down Expand Up @@ -4365,11 +4350,6 @@ is-lambda@^1.0.1:
resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5"
integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=

is-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=

is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
Expand Down

0 comments on commit 6b9504b

Please sign in to comment.