ember-scoped-css 0.2.11 → 0.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-scoped-css",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -13,6 +13,7 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
+ "@babel/parser": "^7.21.4",
16
17
  "blueimp-md5": "^2.19.0",
17
18
  "cheerio": "1.0.0-rc.12",
18
19
  "ember-source": "^4.10.0",
@@ -1,10 +1,15 @@
1
1
  import recast from 'recast';
2
+ import babelParser from '@babel/parser';
2
3
  import path from 'path';
3
4
  import { readFile } from 'fs/promises';
4
5
  import fsExists from './fsExists.js';
5
6
 
7
+ const parseOptions = {
8
+ parser: babelParser,
9
+ };
10
+
6
11
  export default async function (script, id, replaceFunction) {
7
- const ast = recast.parse(script);
12
+ const ast = recast.parse(script, parseOptions);
8
13
  const cssPath = id.replace(/(\.js)|(\.hbs)/, '.css');
9
14
  let css;
10
15
 
@@ -1,7 +1,12 @@
1
1
  import recast from 'recast';
2
+ import babelParser from '@babel/parser';
3
+
4
+ const parseOptions = {
5
+ parser: babelParser,
6
+ };
2
7
 
3
8
  export default function (script, replaceFunction) {
4
- const ast = recast.parse(script);
9
+ const ast = recast.parse(script, parseOptions);
5
10
  recast.visit(ast, {
6
11
  visitCallExpression(path) {
7
12
  const node = path.node;