Skip to content

Commit c1cda5e

Browse files
committed
Remove AMD and CJS build, but keep monaco-converter(/cjs)
1 parent 8a69dba commit c1cda5e

7 files changed

Lines changed: 157 additions & 134 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Or you use a fresh dev environment in [Gitpod](https://www.gitpod.io) which is a
5050

5151
### Scripts Overview
5252

53-
The main [package.json](./package.json) contains script entries applicable to the whole workspace like `clean` amd `compile`, but it also has entries for launching script from the packages (lib and examples).
53+
The main [package.json](./package.json) contains script entries applicable to the whole workspace like `clean` and `compile`, but it also has entries for launching script from the packages (lib and examples).
5454

5555
For example if you want to rebuild the library you can do it in different ways. From CLI run one of:
5656
```bash

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"npm": "8.11.0"
2828
},
2929
"scripts": {
30-
"clean": "npm run clean --workspaces && npm run clean:amd --workspace packages/client && npm run webpack:clean --workspace packages/examples/client",
30+
"clean": "npm run clean --workspaces && npm run webpack:clean --workspace packages/examples/client",
3131
"compile": "npm run compile --workspaces",
3232
"lint": "npm run lint --workspaces",
3333
"dev": "vite --debug --force",

packages/client/CHANGELOG.md

Lines changed: 117 additions & 107 deletions
Large diffs are not rendered by default.

packages/client/package.json

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,18 @@
2727
"types": "./lib/monaco-converter.d.ts",
2828
"default": "./lib/monaco-converter.js"
2929
},
30-
"./cjs": {
31-
"types": "./dist/cjs/index.d.ts",
32-
"default": "./dist/cjs/index.js"
33-
},
3430
"./cjs/monaco-converter": {
3531
"types": "./dist/cjs/monaco-converter.d.ts",
3632
"default": "./dist/cjs/monaco-converter.js"
37-
},
38-
"./amd": {
39-
"types": "./dist/amd/index.d.ts",
40-
"default": "./dist/amd/index.js"
41-
},
42-
"./amd/monaco-converter": {
43-
"types": "./dist/amd/monaco-converter.d.ts",
44-
"default": "./dist/amd/monaco-converter.js"
4533
}
4634
},
4735
"typesVersions": {
4836
"*": {
49-
"cjs": [ "dist/cjs/index" ],
50-
"amd": [ "dist/amd/index" ],
5137
"monaco-converter": [ "lib/monaco-converter" ],
5238
"monaco-converter/cjs": [ "dist/cjs/monaco-converter" ]
5339
}
5440
},
5541
"files": [
56-
"dist/amd",
5742
"dist/cjs",
5843
"lib",
5944
"src",
@@ -76,13 +61,11 @@
7661
},
7762
"scripts": {
7863
"clean": "npx shx rm -fr lib tsconfig.tsbuildinfo",
79-
"clean:amd": "npx shx rm -fr dist/amd dist/tsconfig.tsbuildinfo",
80-
"clean:cjs": "npx shx rm -fr dist/cjs dist/tsconfig.tsbuildinfo",
64+
"clean:cjs": "npx shx rm -fr dist",
8165
"lint": "eslint src --ext .ts",
8266
"compile": "tsc",
8367
"watch": "tsc -w",
84-
"build:amd": "npm run clean:amd && tsc --outDir dist/amd --module amd --declarationDir dist/amd --declaration",
85-
"build:cjs": "npm run clean:cjs && tsc --outDir dist/cjs --module commonjs --declarationDir dist/cjs --declaration",
86-
"build": "npm run clean && npm run compile && npm run build:amd && npm run build:cjs"
68+
"build:cjs": "npm run clean:cjs && tsc -p ./tsconfig.cjs.json",
69+
"build": "npm run clean && npm run compile && npm run build:cjs"
8770
}
8871
}

packages/client/tsconfig.cjs.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "../../tsconfig",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"outDir": "dist/cjs",
6+
"declarationDir": "dist/cjs",
7+
"noUnusedParameters": false,
8+
"module": "CommonJS"
9+
},
10+
"include": [
11+
"src/monaco-converter.ts",
12+
],
13+
"exclude": [
14+
"dist",
15+
"lib",
16+
"node_modules"
17+
]
18+
}

packages/vscode-ws-jsonrpc/CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,25 @@
22

33
All notable changes to this npm module are documented in this file.
44

5+
## 1.x.x BREAKING CHANGES
6+
7+
The default export now provides esm code. If you require CommonJS modules you can use the additional exports.
8+
The npm packages exports the following:
9+
10+
- `vscode-ws-jsonrpc`
11+
- `vscode-ws-jsonrpc/server`
12+
- `vscode-ws-jsonrpc/socket`
13+
- `vscode-ws-jsonrpc/cjs`
14+
- `vscode-ws-jsonrpc/cjs/server`
15+
- `vscode-ws-jsonrpc/cjs/socket`
16+
517
## [1.0.1] - 2022-06-22
618

7-
* Library ships as src, esm and cjs builds. Use `typesVersions` in **package.json** for proper TypeScript import support
19+
- Library ships as src, esm and cjs builds. Use `typesVersions` in **package.json** for proper TypeScript import support
820

921
## [1.0.0] - 2022-06-21
1022

11-
* Merged npm packages `@codingame/monaco-jsonrpc` and `vscode-ws-jsonrpc` into this package.
12-
* Integrate eslint with eslint-config-standard #[385](https://github.com/TypeFox/monaco-languageclient/pull/385)
23+
- Merged npm packages `@codingame/monaco-jsonrpc` and `vscode-ws-jsonrpc` into this package.
24+
- Integrate eslint with eslint-config-standard #[385](https://github.com/TypeFox/monaco-languageclient/pull/385)
1325

1426
There was no CHANGELOG available in the previous repositories.

0 commit comments

Comments
 (0)