ember-estree 0.0.0
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/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ember-estree
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/jscodeshift@17.3.0/node_modules/jscodeshift/bin/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/jscodeshift@17.3.0/node_modules/jscodeshift/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/jscodeshift@17.3.0/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/jscodeshift@17.3.0/node_modules/jscodeshift/bin/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/jscodeshift@17.3.0/node_modules/jscodeshift/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/jscodeshift@17.3.0/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/jscodeshift@17.3.0/node_modules/jscodeshift/bin/jscodeshift.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../../../../node_modules/.pnpm/jscodeshift@17.3.0/node_modules/jscodeshift/bin/jscodeshift.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/vitest@3.2.4/node_modules/vitest/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/vitest@3.2.4/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/vitest@3.2.4/node_modules/vitest/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/vitest@3.2.4/node_modules:/home/nvp/Development/NullVoxPopuli/ember-estree/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vitest@3.2.4/node_modules/vitest/vitest.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../../../../node_modules/.pnpm/vitest@3.2.4/node_modules/vitest/vitest.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jscodeshift",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"packageManager": "pnpm@10.18.2",
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"ember-estree": "workspace:*",
|
|
15
|
+
"jscodeshift": "^17.3.0",
|
|
16
|
+
"vitest": "^3.2.4"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ember-estree",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "ESTree generator for gjs and gts file used by ember",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"keywords": [],
|
|
8
|
+
"author": "",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@babel/core": "^7.28.4",
|
|
12
|
+
"@babel/parser": "^7.28.4",
|
|
13
|
+
"@babel/plugin-transform-typescript": "^7.28.0",
|
|
14
|
+
"@glimmer/syntax": "^0.95.0",
|
|
15
|
+
"content-tag": "^4.0.0",
|
|
16
|
+
"content-tag-utils": "^0.4.1",
|
|
17
|
+
"decorator-transforms": "^2.3.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"vitest": "^3.2.4"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strategy:
|
|
3
|
+
*
|
|
4
|
+
* 1. parse out the <template>...</template> regions
|
|
5
|
+
* - we haven't shipped "content-tag" through TC39, so for now, gjs and gts are invalid JavaScript
|
|
6
|
+
* 2. create a new string/contents of the file with a placeholder for the template regisions
|
|
7
|
+
* - this will be used later to splice in the Template AST Nodes
|
|
8
|
+
* - the placeholder should be the same dimensions as the template region
|
|
9
|
+
* 3. parse the string/contents as js/ts to generate an ESTree
|
|
10
|
+
* 4. parse each template region to generate an AST from that
|
|
11
|
+
* 5. convert the AST from `@glimmer/syntax` to ESTree
|
|
12
|
+
* - NOTE: it may already be ESTree
|
|
13
|
+
* 6. splice in the template ESTrees into the JS/TS ESTree
|
|
14
|
+
* 7. Done
|
|
15
|
+
*/
|