diff --git a/.vscode/settings.json b/.vscode/settings.json index b2c8b512..d19dc3b5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,7 @@ "explorer.fileNesting.patterns": { "*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts, ${capture}.d.ts.map", "*.ts": "${capture}.js, ${capture}.js.map, ${capture}.d.ts, ${capture}.d.ts.map", - "tsconfig.json": "tsconfig.*.json" + "tsconfig.json": "tsconfig.*.json, .tsbuildinfo" }, "files.associations": { "*.ajs": "json", @@ -23,12 +23,20 @@ "files.exclude": { // "**/*.map": true, // "**/*.d.ts": true, - "**/*.tsbuildinfo": true + // "**/*.tsbuildinfo": true }, "git.autoStash": true, - "git.branchProtection": ["main", "next"], - "githubPullRequests.ignoredPullRequestBranches": ["main", "next"], - "markdownlint.ignore": ["**/CHANGELOG.md"], + "git.branchProtection": [ + "main", + "next" + ], + "githubPullRequests.ignoredPullRequestBranches": [ + "main", + "next" + ], + "markdownlint.ignore": [ + "**/CHANGELOG.md" + ], "npm.packageManager": "yarn", "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs", "prettier.useEditorConfig": true, @@ -39,5 +47,10 @@ }, "typescript.enablePromptUseWorkspaceTsdk": true, "typescript.tsdk": ".yarn/sdks/typescript/lib", - "cSpell.words": ["Alwatr", "flatomise", "nanolib", "tsbuildinfo"] + "cSpell.words": [ + "Alwatr", + "flatomise", + "nanolib", + "tsbuildinfo" + ] } diff --git a/package.json b/package.json index 91be8fac..9a3dfd22 100644 --- a/package.json +++ b/package.json @@ -16,19 +16,17 @@ "scripts": { "b": "yarn run build", "c": "yarn run clean", - "cb": "run-s clean build", + "cb": "yarn run clean && yarn run build", "l": "yarn run lint", "f": "yarn run format", - "rl": "run-s pull clean build release", - "upd": "yarn set version latest; yarn up '*' -i; yarn up '*' -R; yarn dlx @yarnpkg/sdks vscode;", - "lint": "run-s lint:ts lint:es", - "lint:es": "eslint . --config .eslintrc.json --ext .ts", - "lint:ts": "lerna run lint:ts", + "rl": "yarn run pull && yarn run clean && yarn run build && yarn run release", + "upd": "yarn set version latest; yarn up '*' -i; yarn up '*' -R; yarn dlx @yarnpkg/sdks vscode; yarn dedupe", + "lint": "eslint . --config .eslintrc.json --ext .ts", "build": "lerna run build", - "format": "run-s format:prettier format:eslint", - "format:eslint": "yarn run lint:es --fix", + "format": "yarn run format:prettier && yarn run format:eslint", + "format:eslint": "yarn run lint --fix", "format:prettier": "prettier . --ignore-path .gitignore --write", - "clean": "git clean -d -x -f --exclude=node_modules --exclude='*.env' --exclude=_data --exclude='.pnp*' --exclude=.yarn", + "clean": "git add . && git clean -d -x -f --exclude=node_modules --exclude='*.env' --exclude=_data --exclude='.pnp*' --exclude=.yarn", "pull": "git pull", "release": "lerna version", "publish": "lerna publish from-package" @@ -46,7 +44,6 @@ "eslint": "^8.56.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "npm-run-all": "^4.1.5", "prettier": "^3.1.1", "typescript": "^5.3.3" }, diff --git a/packages/flat-string/package.json b/packages/flat-string/package.json index 0a9038cd..e810a31a 100644 --- a/packages/flat-string/package.json +++ b/packages/flat-string/package.json @@ -1,22 +1,30 @@ { "name": "@alwatr/flat-string", "version": "1.0.0", - "description": "The `flat-string` function Flattens the underlying C structures of a concatenated JavaScript string.", + "description": "The `flat-string` function flattens the underlying C structures of a concatenated JavaScript string.", + "author": "S. Ali Mihandoost ", "keywords": [ "string", "flat", + "flatten", "optimize", "concat", - "concatenation", "util", "typescript", "esm", "alwatr" ], - "main": "main.js", "type": "module", - "types": "main.d.ts", - "author": "S. Ali Mihandoost ", + "main": "./dist/main.cjs", + "module": "./dist/main.mjs", + "types": "./dist/main.d.ts", + "exports": { + ".": { + "import": "./dist/main.mjs", + "require": "./dist/main.cjs", + "types": "./dist/main.d.ts" + } + }, "license": "MIT", "files": [ "**/*.{d.ts.map,d.ts,js.map,js,html,md}" @@ -38,29 +46,17 @@ "w": "yarn run watch", "c": "yarn run clean", "cb": "yarn run clean && yarn run build", - "d": "yarn run build && ALWATR_DEBUG=1 yarn node", + "d": "yarn run build:es && ALWATR_DEBUG=1 yarn node", "build": "yarn run build:ts & yarn run build:es", - "build:es": "yarn node ./esbuild.mjs", + "build:es": "echo underdevelopment", "build:ts": "tsc --build", - "watch": "run-p -l 'watch:*'", + "watch": "yarn run watch:ts & yarn run watch:es", "watch:es": "yarn run build:es --watch", "watch:ts": "yarn run build:ts --watch --preserveWatchOutput", - "clean": "rm -rfv *.js *.d.ts *.d.ts.map *.js.map .tsbuildinfo" + "clean": "rm -rfv dist .tsbuildinfo" }, "devDependencies": { "@alwatr/tsconfig-base": "workspace:^", "typescript": "^5.3.3" - }, - "tsconfig": { - "extends": "@alwatr/tsconfig-base", - "compilerOptions": { - "composite": true, - "tsBuildInfoFile": ".tsbuildinfo", - "rootDir": "src", - "outDir": "." - }, - "include": [ - "src/**/*.ts" - ] } } diff --git a/packages/flat-string/tsconfig.json b/packages/flat-string/tsconfig.json new file mode 100644 index 00000000..f6b1677c --- /dev/null +++ b/packages/flat-string/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@alwatr/tsconfig-base", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": true, + "composite": true, + "tsBuildInfoFile": ".tsbuildinfo" + }, + "include": ["src/**/*.ts"] +} diff --git a/packages/tsconfig-base/tsconfig.json b/packages/tsconfig-base/tsconfig.json index b5d990b3..6238677b 100644 --- a/packages/tsconfig-base/tsconfig.json +++ b/packages/tsconfig-base/tsconfig.json @@ -6,7 +6,7 @@ "target": "ES2020", "module": "ESNext", "moduleResolution": "Bundler", - "lib": ["ES2023"], + "lib": ["ES2023", "DOM"], // "allowJs": true, // "checkJs": true, // "jsx": "preserve", @@ -56,10 +56,10 @@ /* Source Map Options */ "sourceMap": true, "declarationMap": true, + "inlineSources": true, + // "inlineSourceMap": true, // "sourceRoot": "", // "mapRoot": "", - // "inlineSourceMap": true, - "inlineSources": true, /* Experimental Options */ "experimentalDecorators": true, diff --git a/yarn.lock b/yarn.lock index d7333f12..9e227f07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1071,7 +1071,6 @@ __metadata: eslint: "npm:^8.56.0" eslint-import-resolver-typescript: "npm:^3.6.1" eslint-plugin-import: "npm:^2.29.1" - npm-run-all: "npm:^4.1.5" prettier: "npm:^3.1.1" typescript: "npm:^5.3.3" languageName: unknown @@ -1405,7 +1404,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -1723,19 +1722,6 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^6.0.5": - version: 6.0.5 - resolution: "cross-spawn@npm:6.0.5" - dependencies: - nice-try: "npm:^1.0.4" - path-key: "npm:^2.0.1" - semver: "npm:^5.5.0" - shebang-command: "npm:^1.2.0" - which: "npm:^1.2.9" - checksum: e05544722e9d7189b4292c66e42b7abeb21db0d07c91b785f4ae5fefceb1f89e626da2703744657b287e86dcd4af57b54567cef75159957ff7a8a761d9055012 - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -2746,7 +2732,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": +"graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 @@ -2847,13 +2833,6 @@ __metadata: languageName: node linkType: hard -"hosted-git-info@npm:^2.1.4": - version: 2.8.9 - resolution: "hosted-git-info@npm:2.8.9" - checksum: 317cbc6b1bbbe23c2a40ae23f3dafe9fa349ce42a89a36f930e3f9c0530c179a3882d2ef1e4141a4c3674d6faaea862138ec55b43ad6f75e387fda2483a13c70 - languageName: node - linkType: hard - "hosted-git-info@npm:^7.0.0, hosted-git-info@npm:^7.0.1": version: 7.0.1 resolution: "hosted-git-info@npm:7.0.1" @@ -3369,13 +3348,6 @@ __metadata: languageName: node linkType: hard -"json-parse-better-errors@npm:^1.0.1": - version: 1.0.2 - resolution: "json-parse-better-errors@npm:1.0.2" - checksum: 2f1287a7c833e397c9ddd361a78638e828fc523038bb3441fd4fc144cfd2c6cd4963ffb9e207e648cf7b692600f1e1e524e965c32df5152120910e4903a47dcb - languageName: node - linkType: hard - "json-parse-even-better-errors@npm:^2.3.0": version: 2.3.1 resolution: "json-parse-even-better-errors@npm:2.3.1" @@ -3538,18 +3510,6 @@ __metadata: languageName: node linkType: hard -"load-json-file@npm:^4.0.0": - version: 4.0.0 - resolution: "load-json-file@npm:4.0.0" - dependencies: - graceful-fs: "npm:^4.1.2" - parse-json: "npm:^4.0.0" - pify: "npm:^3.0.0" - strip-bom: "npm:^3.0.0" - checksum: 6b48f6a0256bdfcc8970be2c57f68f10acb2ee7e63709b386b2febb6ad3c86198f840889cdbe71d28f741cbaa2f23a7771206b138cd1bdd159564511ca37c1d5 - languageName: node - linkType: hard - "load-json-file@npm:^7.0.1": version: 7.0.1 resolution: "load-json-file@npm:7.0.1" @@ -3652,13 +3612,6 @@ __metadata: languageName: node linkType: hard -"memorystream@npm:^0.3.1": - version: 0.3.1 - resolution: "memorystream@npm:0.3.1" - checksum: 4bd164657711d9747ff5edb0508b2944414da3464b7fe21ac5c67cf35bba975c4b446a0124bd0f9a8be54cfc18faf92e92bd77563a20328b1ccf2ff04e9f39b9 - languageName: node - linkType: hard - "meow@npm:^12.0.1": version: 12.1.1 resolution: "meow@npm:12.1.1" @@ -3704,7 +3657,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -3894,13 +3847,6 @@ __metadata: languageName: node linkType: hard -"nice-try@npm:^1.0.4": - version: 1.0.5 - resolution: "nice-try@npm:1.0.5" - checksum: 95568c1b73e1d0d4069a3e3061a2102d854513d37bcfda73300015b7ba4868d3b27c198d1dbbd8ebdef4112fc2ed9e895d4a0f2e1cce0bd334f2a1346dc9205f - languageName: node - linkType: hard - "node-domexception@npm:^1.0.0": version: 1.0.0 resolution: "node-domexception@npm:1.0.0" @@ -3950,18 +3896,6 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2": - version: 2.5.0 - resolution: "normalize-package-data@npm:2.5.0" - dependencies: - hosted-git-info: "npm:^2.1.4" - resolve: "npm:^1.10.0" - semver: "npm:2 || 3 || 4 || 5" - validate-npm-package-license: "npm:^3.0.1" - checksum: 357cb1646deb42f8eb4c7d42c4edf0eec312f3628c2ef98501963cc4bbe7277021b2b1d977f982b2edce78f5a1014613ce9cf38085c3df2d76730481357ca504 - languageName: node - linkType: hard - "normalize-package-data@npm:^6.0.0": version: 6.0.0 resolution: "normalize-package-data@npm:6.0.0" @@ -4054,27 +3988,6 @@ __metadata: languageName: node linkType: hard -"npm-run-all@npm:^4.1.5": - version: 4.1.5 - resolution: "npm-run-all@npm:4.1.5" - dependencies: - ansi-styles: "npm:^3.2.1" - chalk: "npm:^2.4.1" - cross-spawn: "npm:^6.0.5" - memorystream: "npm:^0.3.1" - minimatch: "npm:^3.0.4" - pidtree: "npm:^0.3.0" - read-pkg: "npm:^3.0.0" - shell-quote: "npm:^1.6.1" - string.prototype.padend: "npm:^3.0.0" - bin: - npm-run-all: bin/npm-run-all/index.js - run-p: bin/run-p/index.js - run-s: bin/run-s/index.js - checksum: 736ee39bd35454d3efaa4a2e53eba6c523e2e17fba21a18edcce6b221f5cab62000bef16bb6ae8aff9e615831e6b0eb25ab51d52d60e6fa6f4ea880e4c6d31f4 - languageName: node - linkType: hard - "npm-run-path@npm:^5.1.0": version: 5.1.0 resolution: "npm-run-path@npm:5.1.0" @@ -4377,16 +4290,6 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^4.0.0": - version: 4.0.0 - resolution: "parse-json@npm:4.0.0" - dependencies: - error-ex: "npm:^1.3.1" - json-parse-better-errors: "npm:^1.0.1" - checksum: 8d80790b772ccb1bcea4e09e2697555e519d83d04a77c2b4237389b813f82898943a93ffff7d0d2406203bdd0c30dcf95b1661e3a53f83d0e417f053957bef32 - languageName: node - linkType: hard - "parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" @@ -4451,13 +4354,6 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^2.0.1": - version: 2.0.1 - resolution: "path-key@npm:2.0.1" - checksum: dd2044f029a8e58ac31d2bf34c34b93c3095c1481942960e84dd2faa95bbb71b9b762a106aead0646695330936414b31ca0bd862bf488a937ad17c8c5d73b32b - languageName: node - linkType: hard - "path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -4489,15 +4385,6 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^3.0.0": - version: 3.0.0 - resolution: "path-type@npm:3.0.0" - dependencies: - pify: "npm:^3.0.0" - checksum: 1332c632f1cac15790ebab8dd729b67ba04fc96f81647496feb1c2975d862d046f41e4b975dbd893048999b2cc90721f72924ad820acc58c78507ba7141a8e56 - languageName: node - linkType: hard - "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -4519,22 +4406,6 @@ __metadata: languageName: node linkType: hard -"pidtree@npm:^0.3.0": - version: 0.3.1 - resolution: "pidtree@npm:0.3.1" - bin: - pidtree: bin/pidtree.js - checksum: cd69b0182f749f45ab48584e3442c48c5dc4512502c18d5b0147a33b042c41a4db4269b9ce2f7c48f11833ee5e79d81f5ebc6f7bf8372d4ea55726f60dc505a1 - languageName: node - linkType: hard - -"pify@npm:^3.0.0": - version: 3.0.0 - resolution: "pify@npm:3.0.0" - checksum: fead19ed9d801f1b1fcd0638a1ac53eabbb0945bf615f2f8806a8b646565a04a1b0e7ef115c951d225f042cca388fdc1cd3add46d10d1ed6951c20bd2998af10 - languageName: node - linkType: hard - "pify@npm:^6.1.0": version: 6.1.0 resolution: "pify@npm:6.1.0" @@ -4690,17 +4561,6 @@ __metadata: languageName: node linkType: hard -"read-pkg@npm:^3.0.0": - version: 3.0.0 - resolution: "read-pkg@npm:3.0.0" - dependencies: - load-json-file: "npm:^4.0.0" - normalize-package-data: "npm:^2.3.2" - path-type: "npm:^3.0.0" - checksum: 65acf2df89fbcd506b48b7ced56a255ba00adf7ecaa2db759c86cc58212f6fd80f1f0b7a85c848551a5d0685232e9b64f45c1fd5b48d85df2761a160767eeb93 - languageName: node - linkType: hard - "read-pkg@npm:^8.0.0, read-pkg@npm:^8.1.0": version: 8.1.0 resolution: "read-pkg@npm:8.1.0" @@ -4785,7 +4645,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.22.4": +"resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -4798,7 +4658,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": +"resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -4908,15 +4768,6 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.5.0": - version: 5.7.2 - resolution: "semver@npm:5.7.2" - bin: - semver: bin/semver - checksum: e4cf10f86f168db772ae95d86ba65b3fd6c5967c94d97c708ccb463b778c2ee53b914cd7167620950fc07faf5a564e6efe903836639e512a1aa15fbc9667fa25 - languageName: node - linkType: hard - "semver@npm:^6.3.1": version: 6.3.1 resolution: "semver@npm:6.3.1" @@ -4976,15 +4827,6 @@ __metadata: languageName: node linkType: hard -"shebang-command@npm:^1.2.0": - version: 1.2.0 - resolution: "shebang-command@npm:1.2.0" - dependencies: - shebang-regex: "npm:^1.0.0" - checksum: 7b20dbf04112c456b7fc258622dafd566553184ac9b6938dd30b943b065b21dabd3776460df534cc02480db5e1b6aec44700d985153a3da46e7db7f9bd21326d - languageName: node - linkType: hard - "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -4994,13 +4836,6 @@ __metadata: languageName: node linkType: hard -"shebang-regex@npm:^1.0.0": - version: 1.0.0 - resolution: "shebang-regex@npm:1.0.0" - checksum: 9abc45dee35f554ae9453098a13fdc2f1730e525a5eb33c51f096cc31f6f10a4b38074c1ebf354ae7bffa7229506083844008dfc3bb7818228568c0b2dc1fff2 - languageName: node - linkType: hard - "shebang-regex@npm:^3.0.0": version: 3.0.0 resolution: "shebang-regex@npm:3.0.0" @@ -5008,13 +4843,6 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.6.1": - version: 1.8.1 - resolution: "shell-quote@npm:1.8.1" - checksum: 8cec6fd827bad74d0a49347057d40dfea1e01f12a6123bf82c4649f3ef152fc2bc6d6176e6376bffcd205d9d0ccb4f1f9acae889384d20baff92186f01ea455a - languageName: node - linkType: hard - "side-channel@npm:^1.0.4": version: 1.0.4 resolution: "side-channel@npm:1.0.4" @@ -5182,17 +5010,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.padend@npm:^3.0.0": - version: 3.1.5 - resolution: "string.prototype.padend@npm:3.1.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 94ba0d7a463c225d0337ebe4f5c150577d6d09fe56c798f77cd2b11f8d7c9b7b05e65b3c2a273f03529a3f155edb2d78b9c06b7a91f964f89796010a6cbc1dfa - languageName: node - linkType: hard - "string.prototype.trim@npm:^1.2.8": version: 1.2.8 resolution: "string.prototype.trim@npm:1.2.8" @@ -5637,7 +5454,7 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": +"validate-npm-package-license@npm:^3.0.4": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" dependencies: @@ -5705,17 +5522,6 @@ __metadata: languageName: node linkType: hard -"which@npm:^1.2.9": - version: 1.3.1 - resolution: "which@npm:1.3.1" - dependencies: - isexe: "npm:^2.0.0" - bin: - which: ./bin/which - checksum: e945a8b6bbf6821aaaef7f6e0c309d4b615ef35699576d5489b4261da9539f70393c6b2ce700ee4321c18f914ebe5644bc4631b15466ffbaad37d83151f6af59 - languageName: node - linkType: hard - "which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2"