Skip to content

Commit

Permalink
Stop nohoisting extension dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreeman committed May 18, 2023
1 parent 637b7e0 commit bea2107
Show file tree
Hide file tree
Showing 7 changed files with 392 additions and 31 deletions.
2 changes: 1 addition & 1 deletion packages/template/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"extends": "../../../tsconfig.compileroptions.json",
"compilerOptions": {
"noEmit": true,
"lib": ["dom"]
"lib": ["es2020", "dom"]
}
}
11 changes: 5 additions & 6 deletions packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"compile": "tsc --build",
"bundle": "esbuild lib/src/extension.js --bundle --outfile=dist/extension.js --platform=node --external:vscode --minify",
"vscode:prepublish": "yarn build",
"extension:package": "vsce package --no-depencencies",
"extension:package": "vsce package --no-dependencies",
"extension:publish": "vsce publish --no-dependencies"
},
"engines": {
Expand Down Expand Up @@ -85,11 +85,6 @@
"color": "#1E293B",
"theme": "dark"
},
"workspaces": {
"nohoist": [
"**/*"
]
},
"dependencies": {
"vscode-languageclient": "^8.0.1"
},
Expand All @@ -101,11 +96,15 @@
"@types/mocha": "^10.0.1",
"@types/vscode": "^1.68.1",
"@vscode/test-electron": "2.2.0",
"@vscode/vsce": "^2.19.0",
"esbuild": "^0.15.16",
"expect": "^29.5.0",
"mocha": "^10.2.0",
"glob": "^10.2.4"
},
"volta": {
"extends": "../../package.json"
},
"__metadata": {
"id": "f1370239-cb1d-475c-b9da-20961224a998",
"publisherDisplayName": "typed-ember",
Expand Down
3 changes: 3 additions & 0 deletions test-packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"exports": {
".": "./lib/index.js"
},
"dependencies": {
"execa": "^7.1.1"
},
"scripts": {
"test": "true"
}
Expand Down
6 changes: 3 additions & 3 deletions test-packages/test-utils/src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'node:path';
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { createRequire } from 'node:module';
import { node, ExecaChildProcess, Options } from 'execa';
import { execaNode, ExecaChildProcess, Options } from 'execa';
import { type GlintConfigInput } from '@glint/core/config-types';
import { pathUtils, analyzeProject, ProjectAnalysis } from '@glint/core';

Expand Down Expand Up @@ -175,7 +175,7 @@ export class Project {
}

public check(options: Options & { flags?: string[] } = {}): ExecaChildProcess {
return node(require.resolve('@glint/core/bin/glint'), options.flags, {
return execaNode(require.resolve('@glint/core/bin/glint'), options.flags, {
cwd: this.rootDir,
...options,
});
Expand All @@ -188,7 +188,7 @@ export class Project {
public build(options: Options & { flags?: string[] } = {}, debug = false): ExecaChildProcess {
let build = ['--build'];
let flags = options.flags ? build.concat(options.flags) : build;
return node(require.resolve('@glint/core/bin/glint'), flags, {
return execaNode(require.resolve('@glint/core/bin/glint'), flags, {
cwd: this.rootDir,
nodeOptions: debug ? ['--inspect-brk'] : [],
...options,
Expand Down
3 changes: 2 additions & 1 deletion test-packages/test-utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "../../tsconfig.compileroptions.json",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
"rootDir": "src",
"types": ["node"]
},
"include": ["src"],
"references": [{ "path": "../../packages/core" }]
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.compileroptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"esModuleInterop": false,
"composite": true,
"declaration": true,
"sourceMap": true
"sourceMap": true,
"types": []
}
}
Loading

0 comments on commit bea2107

Please sign in to comment.