-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: liveview v2 #209
feat: liveview v2 #209
Conversation
typescriptAuthor: Microsoft Corp. Description: TypeScript is a language for application scale JavaScript development Homepage: https://www.typescriptlang.org/
ts-jestAuthor: Kulshekhar Kabra Description: A preprocessor with source maps support to help use TypeScript with Jest Homepage: https://kulshekhar.github.io/ts-jest
socket.io-clientAuthor: Unknown Description: [![Build Status](https://github.com/socketio/socket.io-client/workflows/CI/badge.svg)](https://github.com/socketio/socket.io-client/actions) [![Dependency Status](https://david-dm.org/socketio/socket.io-client.svg)](https://david-dm.org/socketio/socket.io Homepage: https://github.com/socketio/socket.io-client#readme
|
Created | almost 2 years ago |
Last Updated | 8 months ago |
License | MIT |
Maintainers | 1 |
Releases | 16 |
Direct Dependencies | find-up |
Keywords | rollup, rollup-plugin, node, electron, npm, builtin, modules, bundle, external, dependencies, package.json and monorepo |
README
rollup-plugin-node-externals
A Rollup plugin that automatically declares NodeJS built-in modules as external
. Can also handle npm dependencies, devDependencies, peerDependencies and optionalDependencies. Works in monorepos too!
Why?
By default, Rollup doesn't know a thing about NodeJS, so trying to bundle simple things like import * as path from 'path'
in your code generates an Unresolved dependencies
error. The solution here is twofold:
- Either use some kind of shim like those provided by rollup-plugin-node-builtins.
- Or tell Rollup that the
path
module is in factexternal
: this way, Rollup won't try to bundle it in and rather leave theimport
statement as is (or translate it to arequire()
call if bundling for CommonJS).
However, this must be done for each and every NodeJS built-in: path
, os
, fs
, etc., which can quicky become cumbersome when done manually. So the primary goal of this plugin is simply to automatically declare all NodeJS built-in modules as external
.
Note: the list of builtins is obtained via the builtin-modules package by Sindre Sorhus and should be up-to-date with your current NodeJS version.
This plugin will also allow you to declare your dependencies (as declared in your package.json
file) as external
. This may come in handy when building an Electron app, for example.
Install
npm install --save-dev rollup-plugin-node-externals
Usage
import externals from 'rollup-plugin-node-externals'
export default {
input: { ... },
output: { ... },
plugins: [
externals({
// The path(s) to your package.json. Optional.
// Can be a string or an array of strings for monorepos -- see below
packagePath: 'path/to/package.json',
// Make node builtins external. Optional. Default: true
builtins: true,
// Make pkg.dependencies external. Optional. Default: false
deps: false,
// Make pkg.peerDependencies external. Optional. Default: true
peerDeps: true,
// Make pkg.optionalDependencies external. Optional. Default: true
optDeps: true,
// Make pkg.devDependencies external. Optional. Default: true
devDeps: true,
// Modules to exclude from externals. Optional. Default: none
exclude: [],
// Modules to include in externals. Optional. Default: all
include: [],
// Deprecated -- see below
except: []
})
]
}
Most of the time, the built-in defaults are just what you need:
import externals from 'rollup-plugin-node-externals'
export default {
// ...
plugins: [
externals(), // Bundle deps in; make all Node builtins, devDeps, peerDeps and optDeps external
]
}
Note: if you're also using
@rollup/plugin-node-resolve
, make sure this plugin comes before it in theplugins
array:
import externals from 'rollup-plugin-node-externals'
import resolve from '@rollup/plugin-node-resolve'
// ...
export default {
// ...
plugins: [
externals(),
resolve(),
// other plugins
]
}
Options
By default, the plugin will mark all Node builtin modules and all your dev-
, peer-
and optionalDependencies
as external. Normal dependencies
are left unmarked so Rollup will still bundle them with your code as expected in most situations.
- packagePath?: string | string[] = []
If you're working with monorepos, the packagePath
is made for you. It can take a path, or an array of paths, to your package.json file(s). If not specified, the default is to start with the current directory's package.json then go up scan for all package.json files in parent directories recursively until either the root git directory is reached or until no other package.json can be found.
- builtins?: boolean = true
- deps?: boolean = false
- devDeps?: boolean = true
- peerDeps?: boolean = true
- optDeps?: boolean = true
Set the builtins
, deps
, devDeps
, peerDeps
and/or optDeps
options to false
to prevent the corresponding dependencies from being externalized, therefore letting Rollup bundle them with your code. Set them to true
for Rollup to treat the corresponding dependencies as external.
- include?: string | RegExp | (string | RegExp)[] = []
- exclude?: string | RegExp | (string | RegExp)[] = []
Use the exclude
option to remove certain dependencies from the list of externals, for example:
externals({
deps: true, // Don't bundle dependencies, we'll require() them at runtime instead
exclude: [
'electron-reload', // Yet we want `electron-reload` bundled in
/^vuex?/ // as well as the VueJS family (vue, vuex, vue-router, etc.)
]
})
Use the include
option to force certain dependencies into the list of externals, for example:
externals({
peerDeps: false, // Bundle peerDependencies in
include: /^lodash/ // Except for Lodash
})
Note 1 : falsy values in
include
andexclude
are silently ignored. This allows for conditional constructs like so:exclude: process.env.NODE_ENV === 'production' && /mydep/
.
Note2 : this plugin uses an exact match against your imports, so if your are using some path substitution in your code, eg.:
// in your code, say '@/' is mapped to some directory:
import something from '@/mylib'
and you don't want mylib
bundled in, then write:
// in rollup.config.js:
externals({
include: '@/mylib'
})
Migrating from version 1.x
- In 1.x, normal dependencies were externalized by default. This is no more true, so you'll need to change:
externals()
to:
externals({ deps: true })
if you want the same behavior.
- For consistency with all other Rollup plugins out there, the
except
option from 1.x is now deprecated in favor of the Rollup-friendlyexclude
option. It will be removed in the next major release but is still accepted for backward compatibility and works exactly the same asexclude
but it will issue a warning if used. To suppress this warning, just replaceexcept
withexclude
.
Licence
MIT
lerna
Author: Sebastian McKenzie
Description: A tool for managing JavaScript projects with multiple packages.
Homepage: https://github.com/lerna/lerna#readme
Created | about 5 years ago |
Last Updated | 6 months ago |
License | MIT |
Maintainers | 2 |
Releases | 181 |
Direct Dependencies | @lerna/add , @lerna/bootstrap , @lerna/changed , @lerna/clean , @lerna/cli , @lerna/create , @lerna/diff , @lerna/exec , @lerna/import , @lerna/info , @lerna/init , @lerna/link , @lerna/list , @lerna/publish , @lerna/run , @lerna/version , import-local and npmlog |
Keywords | lerna, monorepo and multi-package |
README
A tool for managing JavaScript projects with multiple packages.
Usage
Check out our documentation here.
npm i -D lerna
jest-junit
Author: Jason Palmer
Description: A jest reporter that generates junit xml files
Homepage: https://github.com/jest-community/jest-junit#readme
Created | about 4 years ago |
Last Updated | 3 months ago |
License | Apache-2.0 |
Maintainers | 2 |
Releases | 42 |
Direct Dependencies | mkdirp , strip-ansi , uuid and xml |
README
jest-junit
A Jest reporter that creates compatible junit xml files
Note: as of jest-junit 11.0.0 NodeJS >= 10.12.0 is required.
Installation
yarn add --dev jest-junit
Usage
In your jest config add the following entry:
{
"reporters": [ "default", "jest-junit" ]
}
Then simply run:
jest
For your Continuous Integration you can simply do:
jest --ci --reporters=default --reporters=jest-junit
Usage as testResultsProcessor
In your jest config add the following entry:
{
"testResultsProcessor": "jest-junit"
}
Then simply run:
jest
For your Continuous Integration you can simply do:
jest --ci --testResultsProcessor="jest-junit"
Configuration
jest-junit
offers several configurations based on environment variables or a jest-junit
key defined in package.json
or a reporter option.
Environment variable and package.json configuration should be strings.
Reporter options should also be strings exception for suiteNameTemplate, classNameTemplate, titleNameTemplate that can also accept a function returning a string.
Environment Variable Name | Reporter Config Name | Description | Default | Possible Injection Values |
---|---|---|---|---|
JEST_SUITE_NAME |
suiteName |
name attribute of <testsuites> |
"jest tests" |
N/A |
JEST_JUNIT_OUTPUT_DIR |
outputDirectory |
Directory to save the output. | process.cwd() |
N/A |
JEST_JUNIT_OUTPUT_NAME |
outputName |
File name for the output. | "junit.xml" |
N/A |
JEST_JUNIT_UNIQUE_OUTPUT_NAME |
uniqueOutputName |
Create unique file name for the output junit-${uuid}.xml , overrides outputName |
false |
N/A |
JEST_JUNIT_SUITE_NAME |
suiteNameTemplate |
Template string for name attribute of the <testsuite> . |
"{title}" |
{title} , {filepath} , {filename} , {displayName} |
JEST_JUNIT_CLASSNAME |
classNameTemplate |
Template string for the classname attribute of <testcase> . |
"{classname} {title}" |
{classname} , {title} , {suitename} , {filepath} , {filename} , {displayName} |
JEST_JUNIT_TITLE |
titleTemplate |
Template string for the name attribute of <testcase> . |
"{classname} {title}" |
{classname} , {title} , {filepath} , {filename} , {displayName} |
JEST_JUNIT_ANCESTOR_SEPARATOR |
ancestorSeparator |
Character(s) used to join the describe blocks. |
" " |
N/A |
JEST_JUNIT_ADD_FILE_ATTRIBUTE |
addFileAttribute |
Add file attribute to the output. This config is primarily for Circle CI. This setting provides richer details but may break on other CI platforms. Must be a string. | "false" |
N/A |
JEST_JUNIT_INCLUDE_CONSOLE_OUTPUT |
includeConsoleOutput |
Adds console output to any testSuite that generates stdout during a test run. | false |
N/A |
JEST_JUNIT_INCLUDE_SHORT_CONSOLE_OUTPUT |
includeShortConsoleOutput |
Adds short console output (only message value) to any testSuite that generates stdout during a test run. | false |
N/A |
JEST_JUNIT_REPORT_TEST_SUITE_ERRORS |
reportTestSuiteErrors |
Reports test suites that failed to execute altogether as error . Note: since the suite name cannot be determined from files that fail to load, it will default to file path. |
false |
N/A |
JEST_USE_PATH_FOR_SUITE_NAME |
usePathForSuiteName |
DEPRECATED. Use suiteNameTemplate instead. Use file path as the name attribute of <testsuite> |
"false" |
N/A |
You can configure these options via the command line as seen below:
JEST_SUITE_NAME="Jest JUnit Unit Tests" JEST_JUNIT_OUTPUT_DIR="./artifacts" jest
Or you can also define a jest-junit
key in your package.json
. All are string values.
{
...
"jest-junit": {
"suiteName": "jest tests",
"outputDirectory": ".",
"outputName": "junit.xml",
"uniqueOutputName": "false",
"classNameTemplate": "{classname}-{title}",
"titleTemplate": "{classname}-{title}",
"ancestorSeparator": " › ",
"usePathForSuiteName": "true"
}
}
Or you can define your options in your reporter configuration.
// jest.config.js
{
reporters: [
"default",
[ "jest-junit", { suiteName: "jest tests" } ]
]
}
Configuration Precedence
If using the usePathForSuiteName
and suiteNameTemplate
, the usePathForSuiteName
value will take precedence. ie: if usePathForSuiteName=true
and suiteNameTemplate="{filename}"
, the filepath will be used as the name
attribute of the <testsuite>
in the rendered jest-junit.xml
).
Examples
Below are some example configuration values and the rendered .xml
to created by jest-junit
.
The following test defined in the file /__tests__/addition.test.js
will be used for all examples:
describe('addition', () => {
describe('positive numbers', () => {
it('should add up', () => {
expect(1 + 2).toBe(3);
});
});
});
Example 1
The default output:
<testsuites name="jest tests">
<testsuite name="addition" tests="1" errors="0" failures="0" skipped="0" timestamp="2017-07-13T09:42:28" time="0.161">
<testcase classname="addition positive numbers should add up" name="addition positive numbers should add up" time="0.004">
</testcase>
</testsuite>
</testsuites>
Example 2
Using the classNameTemplate
and titleTemplate
:
JEST_JUNIT_CLASSNAME="{classname}" JEST_JUNIT_TITLE="{title}" jest
renders
<testsuites name="jest tests">
<testsuite name="addition" tests="1" errors="0" failures="0" skipped="0" timestamp="2017-07-13T09:45:42" time="0.154">
<testcase classname="addition positive numbers" name="should add up" time="0.005">
</testcase>
</testsuite>
</testsuites>
Example 3
Using the ancestorSeparator
:
JEST_JUNIT_ANCESTOR_SEPARATOR=" › " jest
renders
<testsuites name="jest tests">
<testsuite name="addition" tests="1" errors="0" failures="0" skipped="0" timestamp="2017-07-13T09:47:12" time="0.162">
<testcase classname="addition › positive numbers should add up" name="addition › positive numbers should add up" time="0.004">
</testcase>
</testsuite>
</testsuites>
Example 4
Using the suiteNameTemplate
:
JEST_JUNIT_SUITE_NAME ="{filename}" jest
<testsuites name="jest tests">
<testsuite name="addition.test.js" tests="1" errors="0" failures="0" skipped="0" timestamp="2017-07-13T09:42:28" time="0.161">
<testcase classname="addition positive numbers should add up" name="addition positive numbers should add up" time="0.004">
</testcase>
</testsuite>
</testsuites>
Example 5
Using classNameTemplate
as a function in reporter options
// jest.config.js
{
reporters: [
"default",
[
"jest-junit",
{
classNameTemplate: (vars) => {
return vars.classname.toUpperCase();
}
}
]
]
}
renders
<testsuites name="jest tests">
<testsuite name="addition" tests="1" errors="0" failures="0" skipped="0" timestamp="2017-07-13T09:42:28" time="0.161">
<testcase classname="ADDITION POSITIVE NUMBERS" name="addition positive numbers should add up" time="0.004">
</testcase>
</testsuite>
</testsuites>
Adding custom testsuite properties
New feature as of jest-junit 11.0.0!
Create a file in your project root directory named junitProperties.js:
module.exports = () => {
return {
key: "value"
}
});
Will render
<testsuites name="jest tests">
<testsuite name="addition" tests="1" errors="0" failures="0" skipped="0" timestamp="2017-07-13T09:42:28" time="0.161">
<properties>
<property name="key" value="value" />
</properties>
<testcase classname="addition positive numbers should add up" name="addition positive numbers should add up" time="0.004">
</testcase>
</testsuite>
</testsuites>
jest
Author: Unknown
Description: Delightful JavaScript Testing.
Homepage: https://jestjs.io/
Created | almost 9 years ago |
Last Updated | about 1 month ago |
License | MIT |
Maintainers | 8 |
Releases | 264 |
Direct Dependencies | @jest/core , import-local and jest-cli |
Keywords | ava, babel, coverage, easy, expect, facebook, immersive, instant, jasmine, jest, jsdom, mocha, mocking, painless, qunit, runner, sandboxed, snapshot, tap, tape, test, testing, typescript and watch |
eslint-plugin-jest
Author: Jonathan Kim
Description: Eslint rules for Jest
Homepage: https://github.com/jest-community/eslint-plugin-jest#readme
Created | about 4 years ago |
Last Updated | 2 months ago |
License | MIT |
Maintainers | 10 |
Releases | 181 |
Direct Dependencies | @typescript-eslint/experimental-utils |
Keywords | eslint, eslintplugin and eslint-plugin |
eslint-plugin-import
Author: Ben Mosher
Description: Import with sanity.
Homepage: https://github.com/benmosher/eslint-plugin-import
Created | almost 6 years ago |
Last Updated | 4 months ago |
License | MIT |
Maintainers | 3 |
Releases | 105 |
Direct Dependencies | array-includes , array.prototype.flat , contains-path , debug , doctrine , eslint-import-resolver-node , eslint-module-utils , has , minimatch , object.values , read-pkg-up , resolve and tsconfig-paths |
Keywords | eslint, eslintplugin, es6, jsnext, modules, import and export |
eslint-plugin-eslint-comments
Author: Toru Nagashima
Description: Additional ESLint rules for ESLint directive comments.
Homepage: https://github.com/mysticatea/eslint-plugin-eslint-comments#readme
Created | over 4 years ago |
Last Updated | 8 months ago |
License | MIT |
Maintainers | 1 |
Releases | 19 |
Direct Dependencies | escape-string-regexp and ignore |
Keywords | eslint, eslintplugin, eslint-plugin, plugin, comment, comments, directive, global, globals, exported, eslint-env, eslint-enable, eslint-disable, eslint-disable-line and eslint-disable-next-line |
README
eslint-plugin-eslint-comments
Additional ESLint rules for ESLint directive comments (e.g. //eslint-disable-line
).
📖 Usage
🚥 Semantic Versioning Policy
eslint-plugin-eslint-comments
follows semantic versioning and ESLint's Semantic Versioning Policy.
📰 Changelog
🍻 Contributing
Welcome contributing!
Please use GitHub's Issues/PRs.
Development Tools
npm test
runs tests and measures coverage.npm run build
updatesREADME.md
,index.js
, and the header of all rule's documents.npm run clean
removes the coverage of the lastnpm test
command.npm run coverage
shows the coverage of the lastnpm test
command.npm run lint
runs ESLint for this codebase.npm run watch
runs tests and measures coverage when source code are changed.
eslint-import-resolver-typescript
Author: Alex Gorbatchev
Description: TypeScript .ts .tsx module resolver for `eslint-plugin-import`.
Homepage: https://github.com/alexgorbatchev/eslint-import-resolver-typescript#readme
Created | over 3 years ago |
Last Updated | 4 months ago |
License | ISC |
Maintainers | 2 |
Releases | 11 |
Direct Dependencies | debug , glob , is-glob , resolve and tsconfig-paths |
Keywords | typescript, eslint, import, resolver and plugin |
README
eslint-import-resolver-typescript
This plugin adds TypeScript support to eslint-plugin-import
.
This means you can:
import
/require
files with extension.ts
/.tsx
!- Use
paths
defined intsconfig.json
. - Prefer resolve
@types/*
definitions over plain.js
. - Multiple tsconfigs support just like normal.
TOC
Notice
After version 2.0.0, .d.ts
will take higher priority then normal .js
files on resolving node_modules
packages in favor of @types/*
definitions.
If you're facing some problems on rules import/default
or import/named
from eslint-plugin-import, do not post any issue here, because they are just working exactly as expected on our sides, take import-js/eslint-plugin-import#1525 as reference or post a new issue to eslint-plugin-import instead.
Installation
# npm
npm i -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
# yarn
yarn add -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
Configuration
Add the following to your .eslintrc
config:
{
"plugins": ["import"],
"rules": {
// turn on errors for missing imports
"import/no-unresolved": "error"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
// use <root>/tsconfig.json
"typescript": {
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
},
// use <root>/path/to/folder/tsconfig.json
"typescript": {
"project": "path/to/folder"
},
// Multiple tsconfigs (Useful for monorepos)
// use a glob pattern
"typescript": {
"project": "packages/*/tsconfig.json"
},
// use an array
"typescript": {
"project": [
"packages/module-a/tsconfig.json",
"packages/module-b/tsconfig.json"
]
},
// use an array of glob patterns
"typescript": {
"project": [
"packages/*/tsconfig.json",
"other-packages/*/tsconfig.json"
]
}
}
}
}
Contributing
- Make sure your change is covered by a test import.
- Make sure that
yarn test
passes without a failure. - Make sure that
yarn lint
passes without conflicts. - Make sure your code changes match our type-coverage settings:
yarn type-coverage
.
We have GitHub Actions which will run the above commands on your PRs.
If either fails, we won't be able to merge your PR until it's fixed.
@typescript-eslint/parser
Author: Unknown
Description: An ESLint custom parser which leverages TypeScript ESTree
Homepage: https://github.com/typescript-eslint/typescript-eslint#readme
Created | almost 2 years ago |
Last Updated | 2 days ago |
License | BSD-2-Clause |
Maintainers | 1 |
Releases | 1027 |
Direct Dependencies | @typescript-eslint/scope-manager , @typescript-eslint/types , @typescript-eslint/typescript-estree and debug |
Keywords | ast, ecmascript, javascript, typescript, parser, syntax and eslint |
@typescript-eslint/eslint-plugin
Author: Unknown
Description: TypeScript plugin for ESLint
Homepage: https://github.com/typescript-eslint/typescript-eslint#readme
Created | almost 2 years ago |
Last Updated | 2 days ago |
License | MIT |
Maintainers | 1 |
Releases | 1027 |
Direct Dependencies | @typescript-eslint/experimental-utils , @typescript-eslint/scope-manager , debug , functional-red-black-tree , lodash , regexpp , semver and tsutils |
Keywords | eslint, eslintplugin, eslint-plugin and typescript |
@types/socket.io-client
Author: Unknown
Description: TypeScript definitions for socket.io-client
Homepage: http://npmjs.com/package/@types/socket.io-client
Created | over 4 years ago |
Last Updated | 1 day ago |
License | MIT |
Maintainers | 1 |
Releases | 19 |
Direct Dependencies |
README
Installation
npm install --save @types/socket.io-client
Summary
This package contains type definitions for socket.io-client (http://socket.io/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/socket.io-client.
Additional Details
- Last updated: Mon, 11 Jan 2021 22:13:30 GMT
- Dependencies: none
- Global values:
io
Credits
These definitions were written by PROGRE, Damian Connolly, and Florent Poujol.
@types/socket.io
Author: Unknown
Description: TypeScript definitions for socket.io
Homepage: http://npmjs.com/package/@types/socket.io
Created | over 4 years ago |
Last Updated | about 1 month ago |
License | MIT |
Maintainers | 1 |
Releases | 39 |
Direct Dependencies | @types/engine.io , @types/node and @types/socket.io-parser |
README
Installation
npm install --save @types/socket.io
Summary
This package contains type definitions for socket.io (http://socket.io/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/socket.io.
Additional Details
- Last updated: Mon, 07 Dec 2020 16:14:38 GMT
- Dependencies: @types/engine.io, @types/socket.io-parser, @types/node
- Global values:
SocketIO
Credits
These definitions were written by PROGRE, Damian Connolly, Florent Poujol, KentarouTakeda, Alexey Snigirev, Ezinwa Okpoechi, Marek Urbanowicz, and Kevin Kam.
@types/jest
Author: Unknown
Description: TypeScript definitions for Jest
Homepage: http://npmjs.com/package/@types/jest
Created | over 4 years ago |
Last Updated | 6 days ago |
License | MIT |
Maintainers | 1 |
Releases | 148 |
Direct Dependencies | jest-diff and pretty-format |
README
Installation
npm install --save @types/jest
Summary
This package contains type definitions for Jest (https://jestjs.io/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest.
Additional Details
- Last updated: Thu, 07 Jan 2021 08:51:23 GMT
- Dependencies: @types/jest-diff, @types/pretty-format
- Global values:
afterAll
,afterEach
,beforeAll
,beforeEach
,describe
,expect
,fail
,fdescribe
,fit
,it
,jasmine
,jest
,pending
,spyOn
,test
,xdescribe
,xit
,xtest
Credits
These definitions were written by Asana (https://asana.com)
// Ivo Stratev, jwbay, Alexey Svetliakov, Alex Jover Morales, Allan Lukwago, Ika, Waseem Dahman, Jamie Mason, Douglas Duteil, Ahn, Josh Goldberg, Jeff Lau, Andrew Makarov, Martin Hochel, Sebastian Sebald, Andy, Antoine Brault, Gregor Stamać, ExE Boss, Alex Bolenok, Mario Beltrán Alarcón, Tony Hallett, Jason Yu, Devansh Jethmalani, Pawel Fajfer, Regev Brody, and Alexandre Germain.
@tsconfig/node12
Author: Unknown
Description: A base TSConfig for working with Node 12.
Homepage: https://github.com/tsconfig/bases#readme
Created | 8 months ago |
Last Updated | 5 months ago |
License | MIT |
Maintainers | 2 |
Releases | 8 |
README
A base TSConfig for working with Node 12.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/node12
yarn add --dev @tsconfig/node12
Add to your tsconfig.json
:
"extends": "@tsconfig/node12/tsconfig.json"
The tsconfig.json
:
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 12",
"compilerOptions": {
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
"module": "commonjs",
"target": "es2019",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
New dependencies added: @tsconfig/node12
, @types/jest
, @types/socket.io
, @types/socket.io-client
, @typescript-eslint/eslint-plugin
, @typescript-eslint/parser
, eslint-import-resolver-typescript
, eslint-plugin-eslint-comments
, eslint-plugin-import
, eslint-plugin-jest
, jest
, jest-junit
, lerna
, rollup-plugin-node-externals
, socket.io-client
, ts-jest
and typescript
.
Tests:
Classname | Name | Time | Error |
---|---|---|---|
middleware serve file from workspace | middleware serve file from workspace | 0.017 | Error: Request failed with status code 404 at createError (/Users/build/jenkins/workspace/titanium-sdk_liveview_PR-209/node_modules/axios/lib/core/createError.js:16:15) at settle (/Users/build/jenkins/workspace/titanium-sdk_liveview_PR-209/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/Users/build/jenkins/workspace/titanium-sdk_liveview_PR-209/node_modules/axios/lib/adapters/http.js:244:11) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1221:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a few comments while taking a quick scroll through the changes
}, | ||
overrides: [ | ||
{ | ||
files: ['*.ts'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would +typescript
in eslint-config-axway fit here or are you looking for some specific rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, i totally forgot that we have a TypeScript config in there as well. I'll give it a look.
packages/liveview/src/hook.ts
Outdated
@@ -0,0 +1,131 @@ | |||
import { LiveViewServer, WorkspaceOptions, WorkspaceType } from '@liveview/server'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's not a major difference, but would we be able to move the hook itself to the SDK, add the options directly to the build command rather than patching them in this way.
Or would it get a little messy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that should be possible. If i move the bootstrap file from here into the client package then it should be easy to move the hook to the SDK. I'll see how that works ;)
79f8d38
to
c04e25b
Compare
This is so great. Hopefully someone is able to jump on this as well to help finishing it! |
@janvennemann this is a different branch/PR, correct? |
Closing in favor of https://github.com/tidev/liveview/tree/next/vite-4 |
WIP