diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..caad411 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,53 @@ +# USING JEST IN DEBIAN PACKAGING + +# Changes added to jest package in default configuration: + + * jest package excludes .pc/ directory to avoid problems when + upstream tests are patched (default value of --modulePathIgnorePatterns) + * jest package includes Debian nodejs directories + (default values of --modulePaths) + +# Usage notes: + + * when upstream installed snapshots in its test files, it may generate + false-positive autopkgtest regressions (test succeeds but output changed). + To avoid this, use the "-u" option: this updates snapshots and so avoid + these kind of errors + * always use the "--ci" option when jest is used in Debian packaging and/or + autopkgtest. It prevents snapshot from being written + * when your package contains component, it is recommended to set a path + to jest to avoid launching component test that may be incompatible + (component tests can be launched using + debian/nodejs//test). Example: + + $ jest test/ + + * pkg-js-autopkgtest + * jest needs often babel configuration file. Since version 0.9.48, + pkg-js-autopkgtest automatically installs .babelrc and babel.config.json + in test directory (and installed package.json. If your package uses + another file, set a debian/tests/pkg-js/files (see below) + * jest tests often need sources files. Use debian/tests/pkg-js/files in + this case. + * debian/tests/pkg-js/files example (remember that when this file exists, + only the mentioned files and package files are installed in test + directory): + + babel.config.json + src/ + test/ + +# Switching from ava to jest: + +ava is not packaged. You can easily replace it by jest using jest-codemods. +Simply launch this and follow instructions: + + $ npx jest-codemods + +Note that you will probably need a .babelrc or babel.config.json. Example: + + { + "presets": [ "@babel/preset-env" ], + "plugins": [ "@babel/plugin-transform-runtime" ] + } + diff --git a/debian/bcoe-rollup-config.js b/debian/bcoe-rollup-config.js new file mode 100644 index 0000000..7cbef8d --- /dev/null +++ b/debian/bcoe-rollup-config.js @@ -0,0 +1,26 @@ +import babel from '@rollup/plugin-babel'; +import ts from '@rollup/plugin-typescript'; +import commonjs from '@rollup/plugin-commonjs'; +import multiInput from 'rollup-plugin-multi-input'; + +export default { + input: ['../bcoe-v8-coverage/src/lib/*.ts'], + output: { + dir: '../bcoe-v8-coverage/dist/lib', + format: 'cjs', + }, + plugins: [ + multiInput(), + babel({ babelHelpers: 'bundled' }), + ts({ + //declaration: true, + skipLibCheck: true, + exclude:["node_modules","debian","test","gulpfile.ts"], + allowSyntheticDefaultImports: true, + downlevelIteration: true, + //declarationDir:'../bcoe-v8-coverage/dist/lib', + //dir:'../bcoe-v8-coverage/dist/lib', + }), + commonjs(), + ] +}; diff --git a/debian/build_modules/@tsconfig/node10/package.json b/debian/build_modules/@tsconfig/node10/package.json new file mode 100644 index 0000000..7c47272 --- /dev/null +++ b/debian/build_modules/@tsconfig/node10/package.json @@ -0,0 +1 @@ +{"name":"@tsconfig/node10","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 10.","version":"1.0.8"} \ No newline at end of file diff --git a/debian/build_modules/@tsconfig/node10/tsconfig.json b/debian/build_modules/@tsconfig/node10/tsconfig.json new file mode 100644 index 0000000..861f1ee --- /dev/null +++ b/debian/build_modules/@tsconfig/node10/tsconfig.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 10", + + "compilerOptions": { + "lib": ["es2018"], + "module": "commonjs", + "target": "es2018", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/debian/build_modules/@types/node-notifier/index.d.ts b/debian/build_modules/@types/node-notifier/index.d.ts new file mode 100644 index 0000000..9f1e28b --- /dev/null +++ b/debian/build_modules/@types/node-notifier/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for node-notifier 8.0 +// Project: https://github.com/mikaelbr/node-notifier +// Definitions by: Qubo +// Lorenzo Rapetti +// Piotr Błażejewicz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import NotificationCenter = require('./notifiers/notificationcenter'); +import NotifySend = require('./notifiers/notifysend'); +import WindowsToaster = require('./notifiers/toaster'); +import WindowsBalloon = require('./notifiers/balloon'); +import Growl = require('./notifiers/growl'); + +declare namespace nodeNotifier { + interface NodeNotifier extends NodeJS.EventEmitter { + notify(notification?: NotificationCenter.Notification, callback?: NotificationCallback): NotificationCenter; + notify(notification?: WindowsToaster.Notification, callback?: NotificationCallback): WindowsToaster; + notify(notification?: WindowsBalloon.Notification, callback?: NotificationCallback): WindowsBalloon; + notify(notification?: NotifySend.Notification, callback?: NotificationCallback): NotifySend; + notify(notification?: Growl.Notification, callback?: NotificationCallback): Growl; + notify(notification?: Notification | string, callback?: NotificationCallback): NodeNotifier; + NotificationCenter: typeof NotificationCenter; + NotifySend: typeof NotifySend; + WindowsToaster: typeof WindowsToaster; + WindowsBalloon: typeof WindowsBalloon; + Growl: typeof Growl; + } + + interface Notification { + title?: string; + message?: string; + /** Absolute path (not balloons) */ + icon?: string; + /** Wait with callback until user action is taken on notification */ + wait?: boolean; + } + + interface NotificationMetadata { + activationType?: string; + activationAt?: string; + deliveredAt?: string; + activationValue?: string; + activationValueIndex?: string; + } + + interface NotificationCallback { + (err: Error | null, response: string, metadata?: NotificationMetadata): void; + } + + interface Option { + withFallback?: boolean; + customPath?: string; + } +} + +declare var nodeNotifier: nodeNotifier.NodeNotifier; + +export = nodeNotifier; diff --git a/debian/build_modules/@types/node-notifier/notifiers/balloon.d.ts b/debian/build_modules/@types/node-notifier/notifiers/balloon.d.ts new file mode 100644 index 0000000..333ebce --- /dev/null +++ b/debian/build_modules/@types/node-notifier/notifiers/balloon.d.ts @@ -0,0 +1,22 @@ +import notifier = require('../'); + +declare class WindowsBalloon { + constructor(option?: notifier.Option); + notify(notification?: WindowsBalloon.Notification, callback?: notifier.NotificationCallback): WindowsBalloon; +} + +declare namespace WindowsBalloon { + interface Notification { + title?: string; + message?: string; + sound?: boolean; + /** How long to show balloons in ms */ + time?: number; + /** Wait with callback until user action is taken on notification */ + wait?: boolean; + /** The notification type */ + type?: 'info' | 'warn' | 'error'; + } +} + +export = WindowsBalloon; diff --git a/debian/build_modules/@types/node-notifier/notifiers/growl.d.ts b/debian/build_modules/@types/node-notifier/notifiers/growl.d.ts new file mode 100644 index 0000000..4d0460f --- /dev/null +++ b/debian/build_modules/@types/node-notifier/notifiers/growl.d.ts @@ -0,0 +1,25 @@ +import notifier = require('../'); + +declare class Growl { + constructor(option?: Growl.Option); + notify(notification?: Growl.Notification, callback?: notifier.NotificationCallback): Growl; +} + +declare namespace Growl { + interface Option { + name?: string; + host?: string; + port?: number; + } + + interface Notification extends notifier.Notification { + /** whether or not to sticky the notification (defaults to false) */ + sticky?: boolean; + /** type of notification to use (defaults to the first registered type) */ + label?: string; + /** the priority of the notification from lowest (-2) to highest (2) */ + priority?: number; + } +} + +export = Growl; diff --git a/debian/build_modules/@types/node-notifier/notifiers/notificationcenter.d.ts b/debian/build_modules/@types/node-notifier/notifiers/notificationcenter.d.ts new file mode 100644 index 0000000..9d9f171 --- /dev/null +++ b/debian/build_modules/@types/node-notifier/notifiers/notificationcenter.d.ts @@ -0,0 +1,45 @@ +import notifier = require('../'); + +declare class NotificationCenter { + constructor(option?: notifier.Option); + notify( + notification?: NotificationCenter.Notification, + callback?: notifier.NotificationCallback, + ): NotificationCenter; +} + +declare namespace NotificationCenter { + interface Notification extends notifier.Notification { + /** + * Case Sensitive string for location of sound file, or use one of macOS' native sounds. + */ + sound?: boolean | string; + subtitle?: string; + /** Attach image? (Absolute path) */ + contentImage?: string; + /** URL to open on click */ + open?: string; + /** + * The amount of seconds before the notification closes. + * Takes precedence over wait if both are defined. + * As of Version 6.0 there is a default `timeout` set of 10 to ensure that the application closes properly. + * In order to remove the `timeout` and have an instantly closing notification (does not support actions), + * set `timeout` to `false`. + * If you are using action it is recommended to set `timeout` to a high value to ensure the user has time to respond. + */ + timeout?: number | false; + /** Label for cancel button */ + closeLabel?: string; + /** Action label or list of labels in case of dropdown. */ + actions?: string | string[]; + /** Label to be used if there are multiple actions */ + dropdownLabel?: string; + /** + * If notification should take input. + * Value passed as third argument in callback and event emitter. + */ + reply?: boolean; + } +} + +export = NotificationCenter; diff --git a/debian/build_modules/@types/node-notifier/notifiers/notifysend.d.ts b/debian/build_modules/@types/node-notifier/notifiers/notifysend.d.ts new file mode 100644 index 0000000..49cbbd9 --- /dev/null +++ b/debian/build_modules/@types/node-notifier/notifiers/notifysend.d.ts @@ -0,0 +1,26 @@ +import notifier = require('../'); + +declare class NotifySend { + constructor(option?: notifier.Option); + notify(notification?: NotifySend.Notification, callback?: notifier.NotificationCallback): NotifySend; +} + +declare namespace NotifySend { + interface Notification { + title?: string; + message?: string; + icon?: string; + /** Shorthand for timeout 5 seconds if true. Timeout option overrides wait */ + wait?: boolean; + /** Specifies the urgency level (low, normal, critical). */ + urgency?: string; + /** Specifies the timeout in seconds at which to expire the notification. Defaults to 10 seconds */ + timeout?: number | false; + /** Specifies the notification category */ + category?: string; + /** Specifies basic extra data to pass. Valid types are int, double, string and byte. */ + hint?: string; + } +} + +export = NotifySend; diff --git a/debian/build_modules/@types/node-notifier/notifiers/toaster.d.ts b/debian/build_modules/@types/node-notifier/notifiers/toaster.d.ts new file mode 100644 index 0000000..e26460f --- /dev/null +++ b/debian/build_modules/@types/node-notifier/notifiers/toaster.d.ts @@ -0,0 +1,28 @@ +import notifier = require('../'); + +declare class WindowsToaster { + constructor(option?: notifier.Option); + notify(notification?: WindowsToaster.Notification, callback?: notifier.NotificationCallback): WindowsToaster; +} + +declare namespace WindowsToaster { + interface Notification extends notifier.Notification { + /** + * Defined by http://msdn.microsoft.com/en-us/library/windows/apps/hh761492.aspx + */ + sound?: boolean | string; + /** ID to use for closing notification. */ + id?: number; + /** App.ID and app Name. Defaults to no value, causing SnoreToast text to be visible. */ + appID?: string; + /** Refer to previously created notification to close. */ + remove?: number; + /** + * Creates a shortcut in the start menu which point to the + * executable , appID used for the notifications. + */ + install?: string; + } +} + +export = WindowsToaster; diff --git a/debian/build_modules/@types/node-notifier/package.json b/debian/build_modules/@types/node-notifier/package.json new file mode 100644 index 0000000..2c50ee4 --- /dev/null +++ b/debian/build_modules/@types/node-notifier/package.json @@ -0,0 +1,36 @@ +{ + "name": "@types/node-notifier", + "version": "8.0.0", + "description": "TypeScript definitions for node-notifier", + "license": "MIT", + "contributors": [ + { + "name": "Qubo", + "url": "https://github.com/tkQubo", + "githubUsername": "tkQubo" + }, + { + "name": "Lorenzo Rapetti", + "url": "https://github.com/loryman", + "githubUsername": "loryman" + }, + { + "name": "Piotr Błażejewicz", + "url": "https://github.com/peterblazejewicz", + "githubUsername": "peterblazejewicz" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node-notifier" + }, + "scripts": {}, + "dependencies": { + "@types/node": "*" + }, + "typesPublisherContentHash": "aa65cc532fac490753cb2725a7810244aa208c936b075a4e2b19a6eeee1f81d3", + "typeScriptVersion": "3.2" +} \ No newline at end of file diff --git a/debian/build_modules/@types/prettier/doc.d.ts b/debian/build_modules/@types/prettier/doc.d.ts new file mode 100644 index 0000000..bd6f943 --- /dev/null +++ b/debian/build_modules/@types/prettier/doc.d.ts @@ -0,0 +1,153 @@ +import { Doc } from './'; + +// https://github.com/prettier/prettier/blob/master/src/doc/index.js + +export namespace builders { + type Doc = + | string + | Align + | BreakParent + | Concat + | Fill + | Group + | IfBreak + | Indent + | Line + | LineSuffix + | LineSuffixBoundary + | Trim + | Cursor; + + interface Align { + type: 'align'; + contents: Doc; + n: number | string | { type: 'root' }; + } + + interface BreakParent { + type: 'break-parent'; + } + + interface Concat { + type: 'concat'; + parts: Doc[]; + } + + interface Fill { + type: 'fill'; + parts: Doc[]; + } + + interface Group { + type: 'group'; + contents: Doc; + break: boolean; + expandedStates: Doc[]; + } + + interface IfBreak { + type: 'if-break'; + breakContents: Doc; + flatContents: Doc; + } + + interface Indent { + type: 'indent'; + contents: Doc; + } + + interface Line { + type: 'line'; + soft?: boolean; + hard?: boolean; + literal?: boolean; + } + + interface LineSuffix { + type: 'line-suffix'; + contents: Doc; + } + + interface LineSuffixBoundary { + type: 'line-suffix-boundary'; + } + + interface Trim { + type: 'trim'; + } + + interface Cursor { + type: 'cursor'; + placeholder: symbol; + } + + function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc; + function align(n: Align['n'], contents: Doc): Align; + const breakParent: BreakParent; + function concat(contents: Doc[]): Concat; + function conditionalGroup(states: Doc[], opts?: { shouldBreak: boolean }): Group; + function dedent(contents: Doc): Align; + function dedentToRoot(contents: Doc): Align; + function fill(parts: Doc[]): Fill; + function group(contents: Doc, opts?: { shouldBreak: boolean }): Group; + const hardline: Concat; + function ifBreak(breakContents: Doc, flatContents: Doc): IfBreak; + function indent(contents: Doc): Indent; + function join(separator: Doc, parts: Doc[]): Concat; + const line: Line; + function lineSuffix(contents: Doc): LineSuffix; + const lineSuffixBoundary: LineSuffixBoundary; + const literalline: Concat; + function markAsRoot(contents: Doc): Align; + const softline: Line; + const trim: Trim; + const cursor: Cursor; +} + +export namespace debug { + function printDocToDebug(doc: Doc): string; +} + +export namespace printer { + function printDocToString( + doc: Doc, + options: Options, + ): { + formatted: string; + cursorNodeStart?: number; + cursorNodeText?: string; + }; + interface Options { + /** + * Specify the line length that the printer will wrap on. + * @default 80 + */ + printWidth: number; + /** + * Specify the number of spaces per indentation-level. + * @default 2 + */ + tabWidth: number; + /** + * Indent lines with tabs instead of spaces + * @default false + */ + useTabs: boolean; + } +} + +export namespace utils { + function isEmpty(doc: Doc): boolean; + function isLineNext(doc: Doc): boolean; + function willBreak(doc: Doc): boolean; + function traverseDoc( + doc: Doc, + onEnter?: (doc: Doc) => void | boolean, + onExit?: (doc: Doc) => void, + shouldTraverseConditionalGroups?: boolean, + ): void; + function mapDoc(doc: Doc, callback: (doc: Doc) => T): T; + function propagateBreaks(doc: Doc): void; + function removeLines(doc: Doc): Doc; + function stripTrailingHardline(doc: Doc): Doc; +} diff --git a/debian/build_modules/@types/prettier/index.d.ts b/debian/build_modules/@types/prettier/index.d.ts new file mode 100644 index 0000000..bc784a1 --- /dev/null +++ b/debian/build_modules/@types/prettier/index.d.ts @@ -0,0 +1,621 @@ +// Type definitions for prettier 2.1 +// Project: https://github.com/prettier/prettier, https://prettier.io +// Definitions by: Ika , +// Ifiok Jr. , +// Florian Keller , +// Sosuke Suzuki , +// Christopher Quadflieg +// Kevin Deisz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +// This utility is here to handle the case where you have an explicit union +// between string literals and the generic string type. It would normally +// resolve out to just the string type, but this generic LiteralUnion maintains +// the intellisense of the original union. +// +// It comes from this issue: microsoft/TypeScript#29729: +// https://github.com/microsoft/TypeScript/issues/29729#issuecomment-700527227 +export type LiteralUnion = T | (Pick & { _?: never }); + +export type AST = any; +export type Doc = doc.builders.Doc; + +// https://github.com/prettier/prettier/blob/master/src/common/fast-path.js +export interface FastPath { + stack: T[]; + getName(): null | PropertyKey; + getValue(): T; + getNode(count?: number): null | T; + getParentNode(count?: number): null | T; + call(callback: (path: this) => U, ...names: PropertyKey[]): U; + each(callback: (path: this) => void, ...names: PropertyKey[]): void; + map(callback: (path: this, index: number) => U, ...names: PropertyKey[]): U[]; +} + +export type BuiltInParser = (text: string, options?: any) => AST; +export type BuiltInParserName = + | 'babel' + | 'babel-flow' + | 'babel-ts' + | 'flow' + | 'typescript' + | 'css' + | 'less' + | 'scss' + | 'json' + | 'json5' + | 'json-stringify' + | 'graphql' + | 'markdown' + | 'vue' + | 'html' + | 'angular' + | 'mdx' + | 'yaml' + | 'lwc'; +export type BuiltInParsers = Record; + +export type CustomParser = (text: string, parsers: BuiltInParsers, options: Options) => AST; + +export interface Options extends Partial {} +export interface RequiredOptions extends doc.printer.Options { + /** + * Print semicolons at the ends of statements. + * @default true + */ + semi: boolean; + /** + * Use single quotes instead of double quotes. + * @default false + */ + singleQuote: boolean; + /** + * Use single quotes in JSX. + * @default false + */ + jsxSingleQuote: boolean; + /** + * Print trailing commas wherever possible. + * @default 'es5' + */ + trailingComma: 'none' | 'es5' | 'all'; + /** + * Print spaces between brackets in object literals. + * @default true + */ + bracketSpacing: boolean; + /** + * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line. + * @default false + */ + jsxBracketSameLine: boolean; + /** + * Format only a segment of a file. + * @default 0 + */ + rangeStart: number; + /** + * Format only a segment of a file. + * @default Infinity + */ + rangeEnd: number; + /** + * Specify which parser to use. + */ + parser: LiteralUnion | CustomParser; + /** + * Specify the input filepath. This will be used to do parser inference. + */ + filepath: string; + /** + * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. + * This is very useful when gradually transitioning large, unformatted codebases to prettier. + * @default false + */ + requirePragma: boolean; + /** + * Prettier can insert a special @format marker at the top of files specifying that + * the file has been formatted with prettier. This works well when used in tandem with + * the --require-pragma option. If there is already a docblock at the top of + * the file then this option will add a newline to it with the @format marker. + * @default false + */ + insertPragma: boolean; + /** + * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer. + * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out. + * @default 'preserve' + */ + proseWrap: 'always' | 'never' | 'preserve'; + /** + * Include parentheses around a sole arrow function parameter. + * @default 'always' + */ + arrowParens: 'avoid' | 'always'; + /** + * The plugin API is in a beta state. + */ + plugins: Array; + /** + * How to handle whitespaces in HTML. + * @default 'css' + */ + htmlWhitespaceSensitivity: 'css' | 'strict' | 'ignore'; + /** + * Which end of line characters to apply. + * @default 'lf' + */ + endOfLine: 'auto' | 'lf' | 'crlf' | 'cr'; + /** + * Change when properties in objects are quoted. + * @default 'as-needed' + */ + quoteProps: 'as-needed' | 'consistent' | 'preserve'; + /** + * Whether or not to indent the code inside