Skip to content

Commit c319b63

Browse files
committed
Reverted back to CommonJS support due to VSCode's issue 130367
1 parent 0e51363 commit c319b63

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "platformio-node-helpers",
3-
"version": "12.0.0",
3+
"version": "11.2.0",
44
"description": "Collection of Node.JS helpers for PlatformIO",
5-
"exports": "./dist/index.js",
5+
"main": "dist/index.js",
66
"engines": {
7-
"node": ">=18"
7+
"node": ">=14"
88
},
99
"scripts": {
1010
"build": "webpack --env build",
@@ -51,10 +51,10 @@
5151
},
5252
"homepage": "https://platformio.org",
5353
"dependencies": {
54-
"global-agent": "~3.0.0",
55-
"got": "~14.4.5",
54+
"global-agent": "^3.0.0",
55+
"got": "^14.4.5",
5656
"jsonrpc-lite": "~2.1.1",
57-
"semver": "~7.6.3",
57+
"semver": "^7.6.3",
5858
"tar": "~7.4.3",
5959
"tcp-port-used": "~1.0.2",
6060
"ws": "~8.18.0"

src/installer/get-python.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import * as core from '../core';
1010
import * as proc from '../proc';
11+
import * as tar from 'tar';
1112

1213
import { callInstallerScript } from './get-platformio';
1314
import crypto from 'crypto';
@@ -18,7 +19,6 @@ import path from 'path';
1819
import { promisify } from 'util';
1920
import semver from 'semver';
2021
import stream from 'stream';
21-
import tar from 'tar';
2222
import zlib from 'zlib';
2323

2424
const HTTPS_CA_CERTIFICATES = `

webpack.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
* the root directory of this source tree.
77
*/
88

9-
import fs from 'fs';
10-
import path from 'path';
11-
import webpack from 'webpack';
9+
const fs = require('fs');
10+
const path = require('path');
11+
const webpack = require('webpack');
1212

13-
const packageConfig = JSON.parse(fs.readFileSync('./package.json'), 'utf8');
13+
const packageConfig = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
1414

15-
export default {
15+
module.exports = {
1616
mode: 'production',
17-
entry: './src/index.js',
17+
entry: __dirname + '/src/index.js',
1818
output: {
19-
path: path.resolve('./dist'),
19+
path: path.join(__dirname, 'dist'),
2020
filename: 'index.js',
2121
library: 'platformio-node-helpers',
2222
libraryTarget: 'umd',

0 commit comments

Comments
 (0)