GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: support revert array in vm by mytEcust · Pull Request #69 · node-modules/js-to-java

Conversation

@mytEcust

@mytEcust mytEcust commented Jul 10, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

support revert in vm

Array.isArray(new vm.Script('[]').runInNewContext({}))
true
new vm.Script('[]').runInNewContext({}) instanceof Array
false

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mytEcust
mytEcust force-pushed the feat/revertArrayInVm branch from 69ae281 to d44ed60 Compare July 10, 2023 09:58
fengmk2
fengmk2 reviewed Jul 10, 2023
View reviewed changes
Comment thread lib/revert.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

fengmk2
fengmk2 reviewed Jul 10, 2023
View reviewed changes
Comment thread lib/revert.js
Object.prototype.toString.call(java) === '[object Boolean]'||
Object.prototype.toString.call(java) === '[object Date]' ||
Object.prototype.toString.call(java) === '[object Number]' ||
Object.prototype.toString.call(java) === '[object RegExp]' ||

@fengmk2 fengmk2 Jul 10, 2023

Copy link
Copy Markdown
Member

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.

原来的 instanceof 也留着?全靠 toString 判断我也担心没法覆盖全。

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mytEcust mytEcust Jul 10, 2023

Copy link
Copy Markdown
Contributor Author

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.

已保留

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
对二
feat: support revert array in vm
db38a57
@mytEcust
mytEcust force-pushed the feat/revertArrayInVm branch from a46ead2 to db38a57 Compare July 10, 2023 14:30
fengmk2
fengmk2 approved these changes Jul 11, 2023
View reviewed changes
@fengmk2 fengmk2 added the enhancement label Jul 11, 2023
@fengmk2
fengmk2 merged commit dcb2384 into node-modules:master Jul 11, 2023
@fengmk2

fengmk2 commented Jul 11, 2023

Copy link
Copy Markdown
Member

我改动 github action 跑完之后发一个版本。

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

fengmk2 pushed a commit that referenced this pull request Jul 11, 2023
@semantic-release-bot
Release 2.8.0
d02a5a7
[skip ci]

## [2.8.0](v2.7.0...v2.8.0) (2023-07-11)

### Features

* support revert array in vm ([#69](#69)) ([dcb2384](dcb2384))
@fengmk2

fengmk2 commented Jul 11, 2023

Copy link
Copy Markdown
Member

2.8.0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fengmk2 fengmk2 fengmk2 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mytEcust @fengmk2
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.