add publish infra

This commit is contained in:
Maxwell Brown 2024-10-26 13:03:34 -04:00
parent b95d19325b
commit 3e802f7d5c
No known key found for this signature in database
20 changed files with 206248 additions and 199627 deletions

16
.changeset/config.json Normal file
View file

@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "Effect-TS/monaco-editor"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}

View file

@ -0,0 +1,5 @@
---
'@effect/monaco-editor': patch
---
initial forked version of monaco-editor for the Effect Playground

View file

@ -1,57 +0,0 @@
name: Bug Report
description: File a bug report
title: '[Bug] '
body:
- type: markdown
attributes:
value: |
To help us processing your bug report, please fill out this form.
- type: checkboxes
id: reproducible-in-vscode
attributes:
label: Reproducible in vscode.dev or in VS Code Desktop?
description: Can you reproduce the bug in [vscode.dev](https://vscode.dev) or in VS Code Desktop? If so, please create [an issue in the VS Code repository](https://github.com/microsoft/vscode/issues). **VS Code issues are usually looked at within a couple of days.**
options:
- label: Not reproducible in [vscode.dev](https://vscode.dev) or VS Code Desktop
required: true
- type: checkboxes
id: reproducible-in-monaco-playground
attributes:
label: Reproducible in the monaco editor playground?
description: Can you reproduce the bug in [the monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html)? A minimal reproducible example will make it significantly easier for us to get this bug fixed.
options:
- label: Not reproducible in [the monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html)
- type: textarea
id: playgroundLink
attributes:
label: Monaco Editor Playground Link
description: Please share the link to the [monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html) after you entered your example. In case of regressions, please also provide the first broken version.
- type: textarea
id: playgroundSourceCode
attributes:
label: Monaco Editor Playground Code
description: Please provide the code from the monaco editor playground example.
render: typescript
- type: textarea
id: steps
attributes:
label: Reproduction Steps
description: Please describe the steps (in the playground) that lead to the problematic behavior
- type: textarea
id: actual-behavior
attributes:
label: Actual (Problematic) Behavior
description: Please describe the actual (problematic) behavior, as observed in the playground.
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: Please describe the expected behavior.
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Please provide additional context.

View file

@ -1,38 +0,0 @@
name: Feature Request
description: Suggest an idea for this project
title: '[Feature Request] '
labels:
- 'feature-request'
body:
- type: markdown
attributes:
value: |
To help us efficiently reviewing your feature request, please fill out this form.
- type: checkboxes
id: not
attributes:
label: Context
options:
- label: This issue is not a bug report. *(please use a different template for reporting a bug)*
required: true
- label: This issue is not a duplicate of an existing issue. *(please use the [search](https://github.com/microsoft/monaco-editor/issues) to find existing issues)*
required: true
- type: textarea
id: description
attributes:
label: Description
description: Please describe your feature request.
- type: textarea
id: relevantCodePlaygroundLink
attributes:
label: Monaco Editor Playground Link
description: If applicable, please share the link to a relevant [monaco editor playground sample](https://microsoft.github.io/monaco-editor/playground.html)
- type: textarea
id: releveantCode
attributes:
label: Monaco Editor Playground Code
description: If applicable, please share the code from the monaco editor playground sample.
render: typescript

View file

@ -1,4 +0,0 @@
---
name: Other Request (For Maintainers Only)
about: This issue template should only be used by maintainers.
---

View file

@ -1,5 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://stackoverflow.com/questions/tagged/monaco-editor
about: Please ask and answer questions here.

View file

@ -1,7 +0,0 @@
---
title: NPM Publishing Failed
assignees: []
labels: bug
---
NPM publishing failed. Check the last GitHub Action log.

33
.github/workflows/check.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: Check
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
build:
if: github.repository_owner == 'Effect-Ts'
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- run: npm run build-monaco-editor
- run: npm run import-typescript
- run: npm run build-monaco-editor
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,76 +0,0 @@
name: CI
on: [push, pull_request]
jobs:
build:
name: CI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache node modules
id: cacheNodeModules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('**/package-lock.json', '**/package.json') }}
restore-keys: ${{ runner.os }}-cacheNodeModules2-
- name: execute `npm ci` (1)
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm ci
- name: execute `npm ci` (2)
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm ci --prefix webpack-plugin
- name: Install Playwright
run: npm run playwright-install
- name: Install OS Dependencies for Playwright
run: sudo npm run playwright-install-deps
- name: Check prettier
run: npm run prettier-check
- name: Build
run: npm run build-monaco-editor
- name: Run unit tests
run: npm test
- name: Compile webpack plugin
run: npm run compile --prefix webpack-plugin
- name: Package using webpack plugin
run: npm run package-for-smoketest-webpack
- name: Package using esbuild
run: npm run package-for-smoketest-esbuild
- name: Package using vite
run: npm run package-for-smoketest-vite
# - name: Package using parcel
# run: npm run package-for-smoketest-parcel --prefix test/smoke/parcel
# Disabled for now, as the parcel bundler cannot deal with VS Code process variable
- name: Run smoke test
run: npm run smoketest
- name: Install website node modules
working-directory: website
run: yarn install --frozen-lockfile
- name: Build website
working-directory: website
run: yarn run build
- name: Test website
working-directory: website
run: yarn test

32
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Release
on:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions: {}
jobs:
release:
if: github.repository_owner == 'Effect-Ts'
name: Release
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
version: npm changeset-version
publish: npm changeset-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View file

@ -1,66 +0,0 @@
name: Publish Website
on:
schedule:
- cron: 0 23 * * *
workflow_dispatch: {}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # pin@v2
with:
node-version: 16
- name: Cache node modules
id: cacheNodeModules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-cacheNodeModules2-
- name: execute `npm ci` (1)
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm ci
- name: Build
run: npm run build-monaco-editor
- name: Install website node modules
working-directory: website
run: yarn install --frozen-lockfile
- name: Install most recent version of monaco-editor
working-directory: website
run: yarn add monaco-editor
- name: Build website
working-directory: website
run: yarn run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: './website/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1729850857,
"narHash": "sha256-WvLXzNNnnw+qpFOmgaM3JUlNEH+T4s22b5i2oyyCpXE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "41dea55321e5a999b17033296ac05fe8a8b5a257",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

27184
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,18 @@
{
"name": "@effect/monaco-editor",
"version": "0.52.0",
"version": "0.0.0",
"vscodeRef": "493330cdc6475247184ea459c66776c3da12cd2d",
"private": true,
"description": "A browser based code editor",
"description": "A custom fork of Monaco Editor maintained for the Effect Playground",
"homepage": "https://github.com/microsoft/monaco-editor",
"author": "Microsoft Corporation",
"license": "MIT",
"publishConfig": {
"access": "public",
"provenance": true
},
"files": [
"out/monaco-editor"
],
"scripts": {
"import-typescript": "ts-node ./build/importTypescript",
"playwright-install": "node ./node_modules/playwright/install.js",
@ -28,15 +34,19 @@
"update-actions": "pin-github-action ./.github/workflows/website.yml",
"watch": "tsc -w -p ./src",
"build": "ts-node ./build/build-languages",
"build-monaco-editor": "npm run build && ts-node ./build/build-monaco-editor"
"build-monaco-editor": "npm run build && ts-node ./build/build-monaco-editor",
"changeset-version": "changeset version",
"changeset-publish": "npm run build-monaco-editor && npm run import-typescript && npm run build-monaco-editor && changeset publish"
},
"typings": "./esm/vs/editor/editor.api.d.ts",
"module": "./esm/vs/editor/editor.main.js",
"repository": {
"type": "git",
"url": "https://github.com/microsoft/monaco-editor"
"url": "git+https://github.com/Effect-TS/monaco-editor.git"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.9",
"@types/mocha": "^9.1.0",
"@types/shelljs": "^0.8.11",
"@typescript/vfs": "^1.3.5",
@ -63,7 +73,7 @@
"style-loader": "^3.3.1",
"terser": "^5.14.2",
"ts-node": "^10.6.0",
"typescript": "^5.4.5",
"typescript": "^5.6.3",
"vite": "^3.2.8",
"vscode-css-languageservice": "6.2.14",
"vscode-html-languageservice": "5.2.0",

View file

@ -80,16 +80,21 @@ libFileSet['lib.es2023.array.d.ts'] = true;
libFileSet['lib.es2023.collection.d.ts'] = true;
libFileSet['lib.es2023.d.ts'] = true;
libFileSet['lib.es2023.full.d.ts'] = true;
libFileSet['lib.es2023.intl.d.ts'] = true;
libFileSet['lib.es5.d.ts'] = true;
libFileSet['lib.es6.d.ts'] = true;
libFileSet['lib.esnext.array.d.ts'] = true;
libFileSet['lib.esnext.collection.d.ts'] = true;
libFileSet['lib.esnext.d.ts'] = true;
libFileSet['lib.esnext.decorators.d.ts'] = true;
libFileSet['lib.esnext.disposable.d.ts'] = true;
libFileSet['lib.esnext.full.d.ts'] = true;
libFileSet['lib.esnext.intl.d.ts'] = true;
libFileSet['lib.esnext.iterator.d.ts'] = true;
libFileSet['lib.esnext.object.d.ts'] = true;
libFileSet['lib.esnext.promise.d.ts'] = true;
libFileSet['lib.esnext.regexp.d.ts'] = true;
libFileSet['lib.esnext.string.d.ts'] = true;
libFileSet['lib.scripthost.d.ts'] = true;
libFileSet['lib.webworker.asynciterable.d.ts'] = true;
libFileSet['lib.webworker.d.ts'] = true;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -2,4 +2,4 @@
// **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`
//
export const typescriptVersion = "5.4.5";
export const typescriptVersion = "5.6.3";