René's URL Explorer Experiment


Title: Fails at import statement with "with" or "assert" · Issue #1256 · javascript-obfuscator/javascript-obfuscator · GitHub

Open Graph Title: Fails at import statement with "with" or "assert" · Issue #1256 · javascript-obfuscator/javascript-obfuscator

X Title: Fails at import statement with "with" or "assert" · Issue #1256 · javascript-obfuscator/javascript-obfuscator

Description: Expected Behavior The obsufcator sees this as normal js code. Current Behavior Currently it fails at import statements using "with" like: import config from "../../config.json" with { type: "json" }; or import config from "../../config.j...

Open Graph Description: Expected Behavior The obsufcator sees this as normal js code. Current Behavior Currently it fails at import statements using "with" like: import config from "../../config.json" with { type: "json" ...

X Description: Expected Behavior The obsufcator sees this as normal js code. Current Behavior Currently it fails at import statements using "with" like: import config from "../../config.json" ...

Opengraph URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fails at import statement with \"with\" or \"assert\" ","articleBody":"\u003c!-- Love javascript-obfuscator? Please consider supporting our collective:\r\n👉  https://opencollective.com/javascript-obfuscator/donate --\u003e\r\n\r\n\u003c!--- Provide a general summary of the issue in the Title above --\u003e\r\n\r\n## Expected Behavior\r\nThe obsufcator sees this as normal js code.\r\n\r\n## Current Behavior\r\nCurrently it fails at import statements using \"with\" like:\r\n```js\r\nimport config from \"../../config.json\" with { type: \"json\" };\r\n\r\nor\r\n\r\nimport config from \"../../config.json\" assert{ type: \"json\" };\r\n```\r\n\r\n## Steps to Reproduce\r\n\u003c!--- Provide a link to a live example, or an unambiguous set of steps to --\u003e\r\n\u003c!--- reproduce this bug. Include code to reproduce, if relevant --\u003e\r\n1. create a index.js\r\n2. import file using \"with\" operator\r\n3.  run obfuscator\r\n4. see it fail\r\n\r\n## Your Environment\r\n\u003c!--- Include as many relevant details about the environment you experienced the bug in --\u003e\r\n* Obfuscator version used: ^4.1.0\r\n* Node version used: v20.13.1\r\n\r\n# Stack trace\r\n```\r\nError: ERROR at line 12: Unexpected token (12:39)\r\n\u003e ..../config.json\" with { type: \"j...\r\n    at Function.processParsingError (C:\\Users\\Bamad\\WebstormProjects\\BirdieAI\\src\\node_modules\\javascript-obfuscator\\dist\\webpack:\\javascript-obfuscator\\src\\ASTParserFacade.ts:77:15)\r\n    at Function.parse (C:\\Users\\Bamad\\WebstormProjects\\BirdieAI\\src\\node_modules\\javascript-obfuscator\\dist\\webpack:\\javascript-obfuscator\\src\\ASTParserFacade.ts:43:49)\r\n    at o.parseCode (C:\\Users\\Bamad\\WebstormProjects\\BirdieAI\\src\\node_modules\\javascript-obfuscator\\dist\\webpack:\\javascript-obfuscator\\src\\JavaScriptObfuscator.ts:87:50)\r\n    at obfuscate (C:\\Users\\Bamad\\WebstormProjects\\BirdieAI\\src\\node_modules\\javascript-obfuscator\\dist\\webpack:\\javascript-obfuscator\\src\\JavaScriptObfuscator.ts:78:30)\r\n    at Function.obfuscate (C:\\Users\\Bamad\\WebstormProjects\\BirdieAI\\src\\node_modules\\javascript-obfuscator\\dist\\webpack:\\javascript-obfuscator\\src\\JavaScriptObfuscatorFacade.ts:16:56)\r\n    at copyAndObfuscate (file:///C:/Users/Bamad/WebstormProjects/BirdieAI/src/builder/builder.js:57:54)\r\n    at build (file:///C:/Users/Bamad/WebstormProjects/BirdieAI/src/builder/builder.js:34:5)\r\n    at file:///C:/Users/Bamad/WebstormProjects/BirdieAI/src/builder/builder.js:98:1\r\n    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)\r\n    at ModuleLoader.import (node:internal/modules/esm/loader:316:24)\r\n```\r\n\r\n## Minimal working example that will help to reproduce issue\r\n\r\nJust put `import config from \"../../config.json\" with { type: \"json\" };` in any file.","author":{"url":"https://github.com/Timtendo12","@type":"Person","name":"Timtendo12"},"datePublished":"2024-05-26T16:51:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1256/javascript-obfuscator/issues/1256"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8b859e31-0ba7-070b-7266-a9b88e1801ce
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC3AE:1213B9:357914:4E8975:6A62F5D0
html-safe-nonceaad47abb96685df4bed64c9f1a9b9c8879308736da67305c0a828e56d3e0164d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0FFOjEyMTNCOTozNTc5MTQ6NEU4OTc1OjZBNjJGNUQwIiwidmlzaXRvcl9pZCI6IjU4NDY5ODk4MTIyMTQ3MjQwNDgiLCJyZWdpb25fZWRnZSI6Indlc3R1czIiLCJyZWdpb25fcmVuZGVyIjoid2VzdHVzMiJ9
visitor-hmac5c1a502d2d6642b20132405c3a2020fdee11fde5fb02503a32f40164b53c2983
hovercard-subject-tagissue:2317844214
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javascript-obfuscator/javascript-obfuscator/1256/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dc495fe217a3e5b5449e3ba641855ab8b1be51f79f77d14ce48fd9a84e20e22b/javascript-obfuscator/javascript-obfuscator/issues/1256
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dc495fe217a3e5b5449e3ba641855ab8b1be51f79f77d14ce48fd9a84e20e22b/javascript-obfuscator/javascript-obfuscator/issues/1256
og:image:altExpected Behavior The obsufcator sees this as normal js code. Current Behavior Currently it fails at import statements using "with" like: import config from "../../config.json" with { type: "json" ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTimtendo12
hostnamegithub.com
expected-hostnamegithub.com
Noneb415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30
turbo-cache-controlno-preview
go-importgithub.com/javascript-obfuscator/javascript-obfuscator git https://github.com/javascript-obfuscator/javascript-obfuscator.git
octolytics-dimension-user_id23015672
octolytics-dimension-user_loginjavascript-obfuscator
octolytics-dimension-repository_id58360147
octolytics-dimension-repository_nwojavascript-obfuscator/javascript-obfuscator
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id58360147
octolytics-dimension-repository_network_root_nwojavascript-obfuscator/javascript-obfuscator
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release22f98521e99f504294ab0812b66104d50eb75a70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F1256
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F1256
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=javascript-obfuscator%2Fjavascript-obfuscator
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256
javascript-obfuscator https://github.com/javascript-obfuscator
javascript-obfuscatorhttps://github.com/javascript-obfuscator/javascript-obfuscator
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256
Notifications https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Fork 1.7k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Star 16.2k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues 15 https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests 5 https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality 0 https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
Fails at import statement with "with" or "assert" https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256#top
bughttps://github.com/javascript-obfuscator/javascript-obfuscator/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/Timtendo12
Timtendo12https://github.com/Timtendo12
on May 26, 2024https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256#issue-2317844214
bughttps://github.com/javascript-obfuscator/javascript-obfuscator/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.