-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore: prevent unchecked index access #1612
Open
weboko
wants to merge
16
commits into
master
Choose a base branch
from
weboko/ts-warning
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9e12340
chore: prevent unchecked index access
weboko a9b81a9
fix errors in utils
weboko 3c53ee1
fix message-encryption
weboko c4698d9
fix enr
weboko a5e8c8d
fix core
weboko d785d73
fix relay
weboko e17daf9
fix dns-discovery
weboko ccbb51e
Merge branch 'master' of github.com:waku-org/js-waku into weboko/ts-w…
weboko 38d02d2
fix comment
weboko 3c28c06
Merge branch 'master' of github.com:waku-org/js-waku into weboko/ts-w…
weboko b9154e8
use tsconfig.dev only for tests
weboko 7896dee
use dev tsconfig on all test scripts
weboko b4a323f
make karma use dev tsconfig
weboko 8913dca
remove not needed env from root package.json
weboko 3514fb1
fix bug
weboko 69382bd
Merge branch 'master' into weboko/ts-warning
weboko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
@@ -1,49 +1,58 @@ | ||
const webpack = require("webpack"); | ||
const playwright = require('playwright'); | ||
const playwright = require("playwright"); | ||
|
||
process.env.CHROME_BIN = playwright.chromium.executablePath(); | ||
process.env.FIREFOX_BIN = playwright.firefox.executablePath(); | ||
|
||
const path = require("path"); | ||
const tsConfigFile = path.resolve(__dirname, "./tsconfig.dev.json"); | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
frameworks: ["webpack", "mocha"], | ||
files: ["src/**/!(node).spec.ts"], | ||
preprocessors: { | ||
"src/**/!(node).spec.ts": ["webpack"] | ||
"src/**/!(node).spec.ts": ["webpack"], | ||
}, | ||
envPreprocessor: ["CI"], | ||
reporters: ["progress"], | ||
browsers: ["ChromeHeadless", "FirefoxHeadless"], | ||
singleRun: true, | ||
client: { | ||
mocha: { | ||
timeout: 6000 // Default is 2s | ||
} | ||
timeout: 6000, // Default is 2s | ||
}, | ||
}, | ||
webpack: { | ||
mode: "development", | ||
module: { | ||
rules: [{ test: /\.([cm]?ts|tsx)$/, loader: "ts-loader" }] | ||
rules: [ | ||
{ | ||
test: /\.([cm]?ts|tsx)$/, | ||
loader: "ts-loader", | ||
options: { configFile: tsConfigFile }, | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
"process.env.CI": process.env.CI || false, | ||
"process.env.DISPLAY": "Browser", | ||
}), | ||
new webpack.ProvidePlugin({ | ||
process: "process/browser.js" | ||
}) | ||
process: "process/browser.js", | ||
}), | ||
], | ||
resolve: { | ||
extensions: [".ts", ".tsx", ".js"], | ||
extensionAlias: { | ||
".js": [".js", ".ts"], | ||
".cjs": [".cjs", ".cts"], | ||
".mjs": [".mjs", ".mts"] | ||
} | ||
".mjs": [".mjs", ".mts"], | ||
}, | ||
}, | ||
stats: { warnings: false }, | ||
devtool: "inline-source-map" | ||
} | ||
devtool: "inline-source-map", | ||
}, | ||
}); | ||
}; |
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 |
---|---|---|
|
@@ -28,9 +28,9 @@ | |
"check": "run-s check:*", | ||
"check:workspaces": "npm run check --workspaces --if-present", | ||
"check:ws": "[ $(ls -1 ./packages|wc -l) -eq $(cat package.json | jq '.workspaces | length') ] || exit 1 # check no packages left behind", | ||
"test": "NODE_ENV=test npm run test --workspaces --if-present", | ||
"test:browser": "NODE_ENV=test npm run test:browser --workspaces --if-present", | ||
"test:node": "NODE_ENV=test npm run test:node --workspaces --if-present", | ||
"test": "npm run test --workspaces --if-present", | ||
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. Is not needed as each of internal commands should be worrying about supplying ENV flags |
||
"test:browser": "npm run test:browser --workspaces --if-present", | ||
"test:node": "npm run test:node --workspaces --if-present", | ||
"proto": "npm run proto --workspaces --if-present", | ||
"deploy": "node ci/deploy.js", | ||
"doc": "run-s doc:*", | ||
|
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This change makes tests running in with
tsconfig.dev.json
which makes sense as we do have a lower bar for linting tests.@waku-org/js-waku-developers