Skip to content

Commit

Permalink
Fix verification builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Dec 18, 2024
1 parent 9c35a27 commit dc36d44
Show file tree
Hide file tree
Showing 10 changed files with 3,873 additions and 13 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ jobs:
with:
version: 9

- name: Install
shell: bash
run: |
npm ci
- name: Versions Report
shell: bash
run: |
npm run report:versions
- name: Execute verification
shell: bash
run: |
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
},
"volta": {
"node": "22.12.0",
"npm": "10.9.0"
"npm": "10.9.0",
"pnpm": "9.15.0",
"yarn": "4.5.3"
},
"devDependencies": {
"@codingame/esbuild-import-meta-url-plugin": "~1.0.2",
Expand Down Expand Up @@ -50,7 +52,10 @@
"production:preview": "npm run production:preview --workspace packages/examples",
"dev": "vite",
"dev:debug": "vite --debug --force",
"report:versions": "echo Reporting versions: && echo tsc: && tsc --version && echo npm: && npm --version && echo node: && node --version && echo eslint: && eslint --version && echo vite: && vite --version && echo vitest: && vitest --version",
"report:versions:vite": "echo vite: && vite --version && echo vitest: && vitest --version",
"report:versions:node": "echo npm: && npm --version && echo node: && node --version && echo eslint: && eslint --version",
"report:versions:tools": "echo tsc: && tsc --version && echo eslint: && eslint --version && echo pnpm: && pnpm --version && echo yarn: && yarn --version",
"report:versions": "echo Reporting versions: && npm run report:versions:node && npm run report:versions:vite && npm run report:versions:tools",
"build": "npm run build --workspaces",
"build:client": "npm run build --workspace packages/client",
"build:vscode-ws-jsonrpc": "npm run build --workspace packages/vscode-ws-jsonrpc",
Expand Down
2 changes: 1 addition & 1 deletion verify/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
"start:production": "npm run clean && ng serve --configuration production",
"watch": "npm run clean && ng build --watch --configuration development",
"reset:repo": "git clean -f -X -d"
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ export class MonacoAngularWrapperComponent implements OnDestroy {
handleOnTextChanged() {
const wrapperConfig = this.wrapperConfig();
const textModels = this.wrapper.getTextModels();
if (textModels?.text !== undefined && wrapperConfig !== undefined) {
if (textModels?.modified !== undefined && wrapperConfig !== undefined) {
const newSubscriptions: monaco.IDisposable[] = [];
this.emitCodeChange(textModels, wrapperConfig);
newSubscriptions.push(
textModels.text.onDidChangeContent(() => {
textModels.modified.onDidChangeContent(() => {
this.emitCodeChange(textModels, wrapperConfig);
})
);
Expand All @@ -87,7 +87,7 @@ export class MonacoAngularWrapperComponent implements OnDestroy {

emitCodeChange(textModels: TextModels, wrapperConfig: WrapperConfig) {
const onTextChanged = (textChanges: TextChanges) => {
this.onTextChanged.emit(textChanges.text);
this.onTextChanged.emit(textChanges.modified);
};
didModelContentChange(textModels, wrapperConfig.editorAppConfig?.codeResources, onTextChanged);
}
Expand Down
5 changes: 2 additions & 3 deletions verify/buildAll.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
$MyPath = Split-Path -Path $MyInvocation.MyCommand.Path -Parent

# yarn first, because it usually has the most problems
Set-Location $MyPath/yarn; yarn --version; yarn run verify:ci
Set-Location $MyPath/vite; npm run verify:ci
Set-Location $MyPath/webpack; npm run verify:ci
Set-Location $MyPath/angular; npm run verify:ci
Set-Location $MyPath/next; npm run verify:ci
Set-Location $MyPath/pnpm; pnpm run verify:ci

# yarn example is instable because we can't refence local file based dependencies
Set-Location $MyPath/yarn; yarn run verify:ci
5 changes: 2 additions & 3 deletions verify/buildAll.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
MyPath=$(realpath $(dirname $0))

# yarn first, because it usually has the most problems
cd $MyPath/yarn; yarn --version; yarn run verify:ci
cd $MyPath/vite; npm run verify:ci
cd $MyPath/webpack; npm run verify:ci
cd $MyPath/angular; npm run verify:ci
cd $MyPath/next; npm run verify:ci
cd $MyPath/pnpm; pnpm run verify:ci

# yarn example is instable because we can't refence local file based dependencies
cd $MyPath/yarn; yarn run verify:ci
18 changes: 18 additions & 0 deletions verify/next/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* @type {import('next').NextConfig}
*/
export default {
typescript: {
tsconfigPath: './tsconfig.json',
},
output: 'standalone',
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
config.resolve.fallback.module = false;
config.resolve.fallback.vm = false;
}

return config;
},
};
1 change: 1 addition & 0 deletions verify/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const config = {
extensions: ['.ts', '.js', '.json', '.ttf'],
fallback: {
fs: false,
module: false,
vm: false
}
},
Expand Down
1 change: 0 additions & 1 deletion verify/yarn/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ lib
node_modules
*.tsbuildinfo
.yarn
yarn.lock
.pnp*
Loading

0 comments on commit dc36d44

Please sign in to comment.