Skip to content

Commit

Permalink
disable JSON import
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Feb 11, 2024
1 parent 925596c commit 7baf581
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 8 additions & 6 deletions patches/escodegen+2.0.0.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/escodegen/escodegen.js b/node_modules/escodegen/escodegen.js
index 847fc37..0082e3b 100644
index 847fc37..0c2bc8b 100644
--- a/node_modules/escodegen/escodegen.js
+++ b/node_modules/escodegen/escodegen.js
@@ -33,1219 +33,1376 @@
@@ -33,1219 +33,1378 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

Expand Down Expand Up @@ -80,7 +80,9 @@ index 847fc37..0082e3b 100644
- Primary: 21
+import * as estraverse from 'estraverse';
+import * as esutils from 'esutils';
+import packageJson from './package.json' assert { type: 'json' };
+// TODO - wait until rollup supports import attributes
+// https://github.com/rollup/rollup/issues/4818
+// import packageJson from './package.json' assert { type: 'json' };
+
+var Syntax,
+ Precedence,
Expand Down Expand Up @@ -2375,7 +2377,7 @@ index 847fc37..0082e3b 100644
result.push(indent);
result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
if (i + 1 < iz) {
@@ -1256,1392 +1413,1237 @@
@@ -1256,1392 +1415,1237 @@
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
Expand Down Expand Up @@ -4762,10 +4764,10 @@ index 847fc37..0082e3b 100644
+var attachComments = estraverse.attachComments;
+var precedence = updateDeeply({}, Precedence);
+var browser = false;
+var { version } = packageJson;
+// var { version } = packageJson;
+
+export {
+ version,
+ // version,
+ generate,
+ attachComments,
+ precedence as Precedence,
Expand Down
8 changes: 4 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { importAssertionsPlugin } from 'rollup-plugin-import-assert';
import { importAssertions } from 'acorn-import-assertions';
// import { importAssertionsPlugin } from 'rollup-plugin-import-assert';
// import { importAssertions } from 'acorn-import-assertions';

export default {
input: 'src/wcc.js',
output: {
file: 'dist/wcc.dist.cjs',
format: 'cjs'
},
acornInjectPlugins: [ importAssertions ], // TODO this is depercated in v4.x
// acornInjectPlugins: [ importAssertions ], // TODO this is deprecated in v4.x

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected 'todo' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected ' TODO' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected 'todo' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected ' TODO' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected 'todo' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected ' TODO' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected 'todo' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected ' TODO' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected 'todo' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected ' TODO' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected 'todo' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected ' TODO' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected 'todo' comment: 'acornInjectPlugins: [ importAssertions...'

Check warning on line 12 in rollup.config.js

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected ' TODO' comment: 'acornInjectPlugins: [ importAssertions...'
plugins: [
importAssertionsPlugin(),
// importAssertionsPlugin(),
nodeResolve(),
commonjs()
]
Expand Down

0 comments on commit 7baf581

Please sign in to comment.