Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ jobs:
name: Running tests
command: yarn test --maxWorkers=2

typecheck:
<<: *docker_defaults
steps:
- *attach_workspace
- *install_corepack
- run:
name: Type checking
command: yarn typecheck

done:
<<: *docker_defaults
steps:
Expand All @@ -66,7 +75,7 @@ jobs:

workflows:
version: 2.1
build_and_test:
test_on_pr:
jobs:
- security-tools/supply_chain_guard:
context: new_github_mtservice_read
Expand All @@ -80,7 +89,11 @@ workflows:
- unit_test:
requires:
- dependencies
- typecheck:
requires:
- dependencies
- done:
requires:
- lint
- unit_test
- typecheck
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
"author": "Moneytree",
"license": "MIT",
"scripts": {
"build": "rm -rf dist && webpack",
"build": "rm -rf dist && vite build && tsc --emitDeclarationOnly",
"build:docs": "rm -rf docs/types && typedoc --out docs/types src",
"prepareRelease": "npm run build && git add dist && npm run build:docs && git add docs",
"createChangelog": "conventional-changelog -p conventionalcommits && git add CHANGELOG.md",
"version": "npm run prepareRelease && npm run createChangelog",
"test": "jest --no-cache",
"test:dev": "jest --watch",
"typecheck": "tsc --noEmit",
"lint": "eslint",
"format": "prettier scripts src sample/src --write",
"lint:fix": "yarn lint --fix",
Expand Down Expand Up @@ -50,11 +51,10 @@
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"ts-jest": "29.4.12",
"ts-loader": "^9",
"typedoc": "^0.28.20",
"typescript": "6.0.3",
"webpack": "^5",
"webpack-cli": "^5"
"vite": "^8.1.5",
"vite-plugin-node-polyfills": "^0.28.0"
},
"packageManager": "yarn@4.14.1"
}
30 changes: 30 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { defineConfig } from 'vite';
import path from 'path';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import packageJSON from './package.json';

export default defineConfig({
plugins: [
nodePolyfills({
include: ['process', 'buffer', 'stream']
})
],
define: {
__VERSION__: JSON.stringify(packageJSON.version)
},
build: {
outDir: 'dist',
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
formats: ['cjs'],
fileName: () => 'index.js'
},
rollupOptions: {
output: {
// Match the old webpack commonjs2 output shape: module.exports carries
// both the default export (under `.default`) and all named exports.
exports: 'named'
}
}
}
});
39 changes: 0 additions & 39 deletions webpack.config.js

This file was deleted.

Loading