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 c75304d
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 12 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
2 changes: 0 additions & 2 deletions verify/buildAll.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ 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
2 changes: 0 additions & 2 deletions verify/buildAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ 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
5 changes: 3 additions & 2 deletions verify/yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
"vite": "~6.0.3"
},
"scripts": {
"verify": "yarn install && yarn run build && yarn run start",
"verify:ci": "yarn install && yarn run build",
"version:print": "yarn --version",
"verify": "yarn run version:print && yarn install && yarn run build && yarn run start",
"verify:ci": "yarn run version:print && yarn install && yarn run build",
"clean": "shx rm -fr dist",
"build:msg": "echo Building yarn/vite example:",
"build": "yarn run build:msg && yarn run clean && vite build",
Expand Down
12 changes: 12 additions & 0 deletions verify/yarn/yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!

__metadata:
version: 8
cacheKey: 10c0

"mlc-verify-yarn@workspace:.":
version: 0.0.0-use.local
resolution: "mlc-verify-yarn@workspace:."
languageName: unknown
linkType: soft

0 comments on commit c75304d

Please sign in to comment.