-
Notifications
You must be signed in to change notification settings - Fork 437
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
Remove TypeScript #971
Remove TypeScript #971
Changes from all commits
8ae9925
2932d8d
811ca23
81c37c2
99ddebb
6946ec4
6ad49d0
0b4c693
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: ["eslint:recommended"], | ||
overrides: [ | ||
{ | ||
env: { | ||
node: true | ||
}, | ||
files: [".eslintrc.{js,cjs}"], | ||
parserOptions: { | ||
sourceType: "script" | ||
} | ||
} | ||
], | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module" | ||
}, | ||
rules: { | ||
"comma-dangle": "error", | ||
"curly": ["error", "multi-line"], | ||
"getter-return": "off", | ||
"no-console": "off", | ||
"no-duplicate-imports": ["error"], | ||
"no-multi-spaces": ["error", { "exceptions": { "VariableDeclarator": true }}], | ||
"no-multiple-empty-lines": ["error", { "max": 2 }], | ||
"no-self-assign": ["error", { "props": false }], | ||
"no-trailing-spaces": ["error"], | ||
"no-unused-vars": ["error", { argsIgnorePattern: "_*" }], | ||
"no-useless-escape": "off", | ||
"no-var": ["error"], | ||
"prefer-const": ["error"], | ||
"semi": ["error", "never"] | ||
}, | ||
globals: { | ||
test: true, | ||
setup: true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,39 +39,31 @@ | |
"@playwright/test": "^1.28.0", | ||
"@rollup/plugin-node-resolve": "13.1.3", | ||
"@rollup/plugin-typescript": "^11.0.0", | ||
"@types/multer": "^1.4.5", | ||
"@typescript-eslint/eslint-plugin": "^5.50.0", | ||
"@typescript-eslint/parser": "^5.50.0", | ||
"@web/dev-server-esbuild": "^0.3.3", | ||
"@web/test-runner": "^0.15.0", | ||
"@web/test-runner-playwright": "^0.9.0", | ||
"arg": "^5.0.1", | ||
"body-parser": "^1.20.1", | ||
"chai": "~4.3.4", | ||
"eslint": "^8.13.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"express": "^4.18.2", | ||
"multer": "^1.4.2", | ||
"prettier": "2.6.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How come There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is very nice, we dont need it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why format or type your code just yolo and hope for the best! |
||
"rollup": "^2.35.1", | ||
"ts-node": "^10.9.1", | ||
"tslib": "^2.5.0", | ||
"typescript": "^4.9.5" | ||
"rollup": "^2.35.1" | ||
}, | ||
"scripts": { | ||
"clean": "rm -fr dist", | ||
"clean:win": "rmdir /s /q dist", | ||
"build": "tsc --noEmit false --declaration true --emitDeclarationOnly true --outDir dist/types && rollup -c", | ||
"build:win": "tsc --noEmit false --declaration true --emitDeclarationOnly true --outDir dist/types & rollup -c", | ||
"build": "rollup -c", | ||
"build:win": "rollup -c", | ||
"watch": "rollup -wc", | ||
"start": "ts-node -O '{\"module\":\"commonjs\"}' src/tests/server.ts", | ||
"start": "node src/tests/server.mjs", | ||
"test": "yarn test:unit && yarn test:browser", | ||
"test:browser": "playwright test", | ||
"test:unit": "NODE_OPTIONS=--inspect web-test-runner", | ||
"test:unit:win": "SET NODE_OPTIONS=--inspect & web-test-runner", | ||
"release": "yarn build && npm publish", | ||
"lint": "eslint . --ext .ts" | ||
"lint": "eslint . --ext .js" | ||
}, | ||
"engines": { | ||
"node": ">= 14" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { devices } from "@playwright/test" | ||
|
||
const config = { | ||
projects: [ | ||
{ | ||
name: "chrome", | ||
use: { ...devices["Desktop Chrome"] } | ||
}, | ||
{ | ||
name: "firefox", | ||
use: { ...devices["Desktop Firefox"] } | ||
} | ||
], | ||
retries: 2, | ||
testDir: "./src/tests/", | ||
testMatch: /(functional|integration)\/.*_tests\.js/, | ||
webServer: { | ||
command: "yarn start", | ||
url: "http://localhost:9000/src/tests/fixtures/test.js", | ||
timeout: 120 * 1000, | ||
// eslint-disable-next-line no-undef | ||
reuseExistingServer: !process.env.CI | ||
}, | ||
use: { | ||
baseURL: "http://localhost:9000/" | ||
} | ||
} | ||
|
||
export default config |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import { PageSnapshot } from "./page_snapshot" | ||
import { Renderer } from "../renderer" | ||
import { activateScriptElement } from "../../util" | ||
import { Renderer } from "../renderer" | ||
|
||
export class ErrorRenderer extends Renderer<HTMLBodyElement, PageSnapshot> { | ||
static renderElement(currentElement: HTMLBodyElement, newElement: HTMLBodyElement) { | ||
export class ErrorRenderer extends Renderer { | ||
static renderElement(currentElement, newElement) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We lost information here. |
||
const { documentElement, body } = document | ||
|
||
documentElement.replaceChild(newElement, body) | ||
|
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.
Some of these changes seem not relevant to the PR title/subject. Why were these introduced in this PR?