Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

233 - Q4 2023 pre-release bugs #234

Merged
merged 6 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,502 changes: 279 additions & 1,223 deletions .pnp.cjs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
compressionLevel: mixed

enableGlobalCache: false
enableGlobalCache: false
1 change: 1 addition & 0 deletions remove-me-3bb6aa5950014f3287e8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3bb6aa5950014f3287e8
10 changes: 8 additions & 2 deletions toolchains/solidity/extension/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "import",
"format": [ "camelCase", "PascalCase" ]
}
],
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
Expand All @@ -21,4 +27,4 @@
"dist",
"**/*.d.ts"
]
}
}
4 changes: 2 additions & 2 deletions toolchains/solidity/extension/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
!.vscode/launch.json
!.vscode/tasks.json
!.vscode
dist
5 changes: 5 additions & 0 deletions toolchains/solidity/extension/.vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
1 change: 1 addition & 0 deletions toolchains/solidity/extension/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ vsc-extension-quickstart.md
**/.eslintrc.json
**/*.map
**/*.ts
**/.vscode-test.*
1 change: 0 additions & 1 deletion toolchains/solidity/extension/.yarnrc

This file was deleted.

2 changes: 1 addition & 1 deletion toolchains/solidity/extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

All notable changes to the "extension" extension will be documented in this file.
All notable changes to the "osmium-solidity" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

Expand Down
2 changes: 0 additions & 2 deletions toolchains/solidity/extension/dist/.gitignore

This file was deleted.

44 changes: 25 additions & 19 deletions toolchains/solidity/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@
],
"main": "./dist/extension.js",
"contributes": {
"menus": {
"explorer/context": [
{
"when": "resourceLangId == solidity",
"command": "osmium.lint-sol-file",
"group": "7_modification"
}
]
},
"commands": [
{
"command": "osmium.lint-sol-file",
"title": "Osmium: Lint Solidity File"
"command": "osmium.format-sol-file",
"title": "Osmium: Format Solidity File"
},
{
"command": "osmium.lint-sol-workspace",
"title": "Osmium: Lint Solidity Workspace"
"command": "osmium.format-sol-workspace",
"title": "Osmium: Format Solidity Workspace"
}
],
"languages": [
Expand Down Expand Up @@ -75,20 +84,17 @@
"vscode-languageserver-textdocument": "^1.0.8"
},
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "20.2.5",
"@types/vscode": "^1.75.0",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"@vscode/test-electron": "^2.3.2",
"@vscode/vsce": "2.21.1",
"eslint": "^8.41.0",
"glob": "^8.1.0",
"mocha": "^10.2.0",
"ts-loader": "^9.4.3",
"typescript": "^5.1.3",
"webpack": "^5.85.0",
"webpack-cli": "^5.1.1"
"@types/mocha": "^10.0.6",
"@types/node": "18.x",
"@types/vscode": "^1.54.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@vscode/test-cli": "^0.0.4",
"@vscode/test-electron": "^2.3.8",
"eslint": "^8.56.0",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
}
}
4 changes: 2 additions & 2 deletions toolchains/solidity/extension/src/fmt-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function forgeFmt(

function registerForgeFmtLinter(context: vscode.ExtensionContext) {
const lintSolFile = vscode.commands.registerCommand(
"osmium.lint-sol-file",
"osmium.format-sol-file",
function () {
if (!isFmtInstalled()) {
vscode.window.showErrorMessage(
Expand Down Expand Up @@ -149,7 +149,7 @@ function registerForgeFmtLinter(context: vscode.ExtensionContext) {
);

const lintSolWorkspace = vscode.commands.registerCommand(
"osmium.lint-sol-workspace",
"osmium.format-sol-workspace",
function () {
if (!isFmtInstalled()) {
vscode.window.showErrorMessage(
Expand Down
2 changes: 1 addition & 1 deletion toolchains/solidity/extension/src/tests/test-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class TestManager {
} else {
run.failed(
test,
new vscode.TestMessage(`Test failed\n\${this.extractResultLogs(functionResult).join("\n")}`),
new vscode.TestMessage(`Test failed\n\n${this.extractResultLogs(functionResult).join("\n")}`),
functionTime
);
}
Expand Down
6 changes: 3 additions & 3 deletions toolchains/solidity/extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2020",
"module": "Node16",
"target": "ES2022",
"lib": [
"ES2020"
"ES2022"
],
"sourceMap": true,
"rootDir": "src",
Expand Down
11 changes: 6 additions & 5 deletions toolchains/solidity/extension/vsc-extension-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Setup

* install the recommended extensions (amodio.tsl-problem-matcher and dbaeumer.vscode-eslint)
* install the recommended extensions (amodio.tsl-problem-matcher, ms-vscode.extension-test-runner, and dbaeumer.vscode-eslint)


## Get up and running straight away
Expand All @@ -33,10 +33,11 @@

## Run tests

* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`.
* Press `F5` to run the tests in a new window with your extension loaded.
* See the output of the test result in the debug console.
* Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder.
* Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner)
* Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered.
* Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A`
* See the output of the test result in the Test Results view.
* Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder.
* The provided test runner will only consider files matching the name pattern `**.test.ts`.
* You can create folders inside the `test` folder to structure your tests any way you want.

Expand Down
15 changes: 5 additions & 10 deletions toolchains/solidity/extension/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ts-check

'use strict';

const path = require('path');

//@ts-check
Expand All @@ -11,17 +12,15 @@ const extensionConfig = {
target: 'node', // VS Code extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')

entry: {
extension: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
},
entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
filename: 'extension.js',
libraryTarget: 'commonjs2'
},
externals: {
vscode: 'commonjs vscode', // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
// modules added here also need to be added in the .vscodeignore file
},
resolve: {
Expand All @@ -38,11 +37,7 @@ const extensionConfig = {
loader: 'ts-loader'
}
]
},
{
test: /\.wasm$/,
type: "asset/inline",
},
}
]
},
devtool: 'nosources-source-map',
Expand Down
Loading
Loading