-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: following the deps, require Node.js v14
- Loading branch information
1 parent
ea3e501
commit 5ec15c0
Showing
16 changed files
with
1,867 additions
and
1,832 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "yarn-audit-fix", | ||
"out": "../../../target/docs", | ||
"entryPoints": ["../../../src/main/ts/"], | ||
"exclude": ["../../../src/test", "**/node_modules/**"], | ||
"externalPattern": ["**/node_modules/**"], | ||
"excludeExternals": true, | ||
"excludePrivate": true, | ||
"excludeProtected": true, | ||
"includeVersion": true, | ||
"hideGenerator": true, | ||
"readme": "../../../README.md", | ||
"tsconfig": "../../../tsconfig.json", | ||
"theme": "default" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env node | ||
|
||
const esbuild = require('esbuild') | ||
const { nodeExternalsPlugin } = require('esbuild-node-externals') | ||
const glob = require('fast-glob') | ||
const minimist = require('minimist') | ||
|
||
const {entry, external} = minimist(process.argv.slice(2), { | ||
default: { | ||
entry: './src/main/ts/index.ts' | ||
} | ||
}) | ||
|
||
const esmConfig = { | ||
entryPoints: entry.split(':').map(e => e.includes('*') ? glob.sync(e, {absolute: false, onlyFiles: true}) : e).flat(1), | ||
outdir: './target/esm', | ||
bundle: true, | ||
minify: true, | ||
sourcemap: true, | ||
sourcesContent: false, | ||
platform: 'node', | ||
target: 'ES2020', | ||
format: 'esm', | ||
outExtension: { | ||
'.js': '.mjs' | ||
}, | ||
external: ['node:*'], // https://github.com/evanw/esbuild/issues/1466 | ||
plugins: [nodeExternalsPlugin()], // https://github.com/evanw/esbuild/issues/619 | ||
tsconfig: './tsconfig.json' | ||
} | ||
|
||
const cjsConfig = { | ||
...esmConfig, | ||
outdir: './target/cjs', | ||
target: 'es6', | ||
format: 'cjs', | ||
outExtension: { | ||
'.js': '.cjs' | ||
} | ||
} | ||
|
||
const config = process.argv.includes('--cjs') | ||
? cjsConfig | ||
: esmConfig | ||
|
||
esbuild | ||
.build(config) | ||
.catch(() => process.exit(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
import glob from 'fast-glob' | ||
import { pathToFileURL } from 'node:url' | ||
|
||
const suites = await glob('src/test/**/*.test.{ts,cjs,mjs}', {cwd: process.cwd(), absolute: true, onlyFiles: true}) | ||
|
||
await Promise.all(suites.map(suite => import(pathToFileURL(suite)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"extends": ["eslint-config-qiwi"], | ||
"rules": {}, | ||
"overrides": [ | ||
{ | ||
"files": ["src/test/ts/runner.ts", "src/main/ts/stages.ts"], | ||
"rules": { | ||
"sonarjs/no-duplicate-string": "off", | ||
"@typescript-eslint/ban-ts-comment": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["src/**/*.ts"], | ||
"rules": { | ||
"camelcase": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.