Modified changes to work with typescript at runtime

pull/9/head
ioedeveloper 4 years ago
parent 1154b8ec80
commit e37a1a3071
  1. 3
      apps/remix-ide/webpack.config.js
  2. 2
      libs/remix-solidity/src/compiler/compiler-worker.ts
  3. 4
      libs/remix-solidity/src/compiler/compiler.ts
  4. 3
      package-lock.json
  5. 18
      package.json
  6. 2
      tsconfig.json

@ -1,10 +1,7 @@
const nxWebpack = require('@nrwl/react/plugins/webpack') const nxWebpack = require('@nrwl/react/plugins/webpack')
const path = require('path')
const webpack = require('webpack')
module.exports = config => { module.exports = config => {
const nxWebpackConfig = nxWebpack(config) const nxWebpackConfig = nxWebpack(config)
const { module, module: { rules }, plugins } = nxWebpackConfig
return { return {
...nxWebpackConfig, ...nxWebpackConfig,

@ -1,6 +1,6 @@
'use strict' 'use strict'
import * as solc from 'solc/wrapper' import solc from 'solc/wrapper'
import { CompilerInput, MessageToWorker } from './types' import { CompilerInput, MessageToWorker } from './types'
let compileJSON: ((input: CompilerInput) => string) | null = (input) => { return '' } let compileJSON: ((input: CompilerInput) => string) | null = (input) => { return '' }
const missingInputs: string[] = [] const missingInputs: string[] = []

@ -1,7 +1,7 @@
'use strict' 'use strict'
import { update } from 'solc/abi' import { update } from 'solc/abi'
import * as webworkify from 'webworkify-webpack' import webworkify from 'webworkify-webpack'
import compilerInput from './compiler-input' import compilerInput from './compiler-input'
import { EventManager } from '@remix-project/remix-lib' import { EventManager } from '@remix-project/remix-lib'
import { default as txHelper } from './txHelper'; import { default as txHelper } from './txHelper';
@ -211,7 +211,7 @@ export class Compiler {
*/ */
loadWorker (url: string): void { loadWorker (url: string): void {
this.state.worker = webworkify(require.resolve('./compiler-worker.js')) this.state.worker = webworkify(require.resolve('./compiler-worker'))
const jobs: Record<'sources', SourceWithTarget> [] = [] const jobs: Record<'sources', SourceWithTarget> [] = []
this.state.worker.addEventListener('message', (msg: Record <'data', MessageFromWorker>) => { this.state.worker.addEventListener('message', (msg: Record <'data', MessageFromWorker>) => {

3
package-lock.json generated

@ -41432,7 +41432,8 @@
"webworkify-webpack": { "webworkify-webpack": {
"version": "2.1.5", "version": "2.1.5",
"resolved": "https://registry.npmjs.org/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz", "resolved": "https://registry.npmjs.org/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz",
"integrity": "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw==" "integrity": "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw==",
"dev": true
}, },
"whatwg-encoding": { "whatwg-encoding": {
"version": "1.0.5", "version": "1.0.5",

@ -141,7 +141,6 @@
"http-server": "^0.11.1", "http-server": "^0.11.1",
"npm-install-version": "^6.0.2", "npm-install-version": "^6.0.2",
"time-stamp": "^2.2.0", "time-stamp": "^2.2.0",
"webworkify-webpack": "^2.1.5",
"winston": "^3.3.3" "winston": "^3.3.3"
}, },
"devDependencies": { "devDependencies": {
@ -228,14 +227,14 @@
"nyc": "^13.3.0", "nyc": "^13.3.0",
"onchange": "^3.2.1", "onchange": "^3.2.1",
"prettier": "1.19.1", "prettier": "1.19.1",
"@remix-project/remix-analyzer": "0.5.2", "remix-analyzer": "0.5.2",
"@remix-project/remix-astwalker": "0.0.24", "remix-astwalker": "0.0.24",
"@remix-project/remix-debug": "0.4.4", "remix-debug": "0.4.4",
"@remix-project/remix-lib": "0.4.29", "remix-lib": "0.4.29",
"@remix-project/remix-simulator": "0.1.9-beta.5", "remix-simulator": "0.1.9-beta.5",
"@remix-project/remix-solidity": "0.3.30", "remix-solidity": "0.3.30",
"remix-tabs": "1.0.48", "remix-tabs": "1.0.48",
"@remix-project/remix-tests": "0.1.33", "remix-tests": "0.1.33",
"remixd": "0.1.8-alpha.16", "remixd": "0.1.8-alpha.16",
"request": "^2.83.0", "request": "^2.83.0",
"rimraf": "^2.6.1", "rimraf": "^2.6.1",
@ -256,6 +255,7 @@
"webworkify": "^1.2.1", "webworkify": "^1.2.1",
"worker-loader": "^2.0.0", "worker-loader": "^2.0.0",
"yo-yo": "github:ioedeveloper/yo-yo", "yo-yo": "github:ioedeveloper/yo-yo",
"yo-yoify": "^3.7.3" "yo-yoify": "^3.7.3",
"webworkify-webpack": "^2.1.5"
} }
} }

@ -21,7 +21,7 @@
"@remix-project/remix-debug": ["libs/remix-debug/index.js"], "@remix-project/remix-debug": ["libs/remix-debug/index.js"],
"@remix-project/remix-lib": ["libs/remix-lib/index.js"], "@remix-project/remix-lib": ["libs/remix-lib/index.js"],
"@remix-project/remix-simulator": ["libs/remix-simulator/index.js"], "@remix-project/remix-simulator": ["libs/remix-simulator/index.js"],
"@remix-project/remix-solidity": ["dist/libs/remix-solidity/index.js"], "@remix-project/remix-solidity": ["libs/remix-solidity/src/index.ts"],
"@remix-project/remix-tests": ["libs/remix-tests/src/index.ts"], "@remix-project/remix-tests": ["libs/remix-tests/src/index.ts"],
"@remix-project/remix-url-resolver": ["libs/remix-url-resolver/src/index.ts"] "@remix-project/remix-url-resolver": ["libs/remix-url-resolver/src/index.ts"]
} }

Loading…
Cancel
Save