Skip to content

Commit

Permalink
Replace minilog with nanolog
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jan 14, 2024
1 parent 9511cc4 commit cd9782a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"dependencies": {
"@turbowarp/json": "^0.1.2",
"@turbowarp/nanolog": "^0.1.0",
"@vernier/godirect": "1.5.0",
"arraybuffer-loader": "^1.0.6",
"atob": "2.1.2",
Expand All @@ -46,7 +47,6 @@
"htmlparser2": "3.10.0",
"immutable": "3.8.2",
"jszip": "^3.1.5",
"minilog": "3.1.0",
"scratch-parser": "github:TurboWarp/scratch-parser#master",
"scratch-sb1-converter": "0.2.7",
"scratch-translate-extension-languages": "0.0.20191118205314",
Expand Down
6 changes: 3 additions & 3 deletions src/util/log.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const minilog = require('minilog');
minilog.enable();
const nanolog = require('@turbowarp/nanolog');
nanolog.enable();

module.exports = minilog('vm');
module.exports = nanolog('vm');
2 changes: 1 addition & 1 deletion test/fixtures/dispatch-test-worker-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const path = require('path');

const oldRequire = Module.prototype.require;
Module.prototype.require = function (target) {
if (target.indexOf('/') === -1) {
if (target.indexOf('/') === -1 || target.startsWith('@')) {
// we really do just want to forward the arguments here
// eslint-disable-next-line prefer-rest-params
return oldRequire.apply(this, arguments);
Expand Down
5 changes: 0 additions & 5 deletions test/integration/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const path = require('path');

const test = require('tap').test;

const log = require('../../src/util/log');
const makeTestStorage = require('../fixtures/make-test-storage');
const readFileToBuffer = require('../fixtures/readProjectFile').readFileToBuffer;
const VirtualMachine = require('../../src/index');
Expand Down Expand Up @@ -65,10 +64,6 @@ fs.readdirSync(executeDir)
.filter(uri => fileFilter.test(uri))
.forEach(uri => {
const run = (t, enableCompiler) => {
// Disable logging during this test.
log.suggest.deny('vm', 'error');
t.tearDown(() => log.suggest.clear());

const vm = new VirtualMachine();

// Map string messages to tap reporting methods. This will be used
Expand Down
1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ module.exports = [
'htmlparser2': true,
'immutable': true,
'jszip': true,
'minilog': true,
'scratch-parser': true,
'socket.io-client': true,
'text-encoding': true
Expand Down

0 comments on commit cd9782a

Please sign in to comment.