Skip to content

Commit

Permalink
Merge pull request #200 from hypermod-io/typescript-bundler
Browse files Browse the repository at this point in the history
Move package transpiling to tsc
  • Loading branch information
danieldelcore authored Sep 12, 2023
2 parents a5ad460 + b10fc6a commit 5a41594
Show file tree
Hide file tree
Showing 45 changed files with 242 additions and 2,866 deletions.
34 changes: 34 additions & 0 deletions .changeset/cuddly-owls-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
'@hypermod/mod-atlaskit__progress-indicator': patch
'@hypermod/mod-atlaskit__section-message': patch
'@hypermod/mod-atlaskit__side-navigation': patch
'@hypermod/mod-atlaskit__breadcrumbs': patch
'@hypermod/mod-atlaskit__textfield': patch
'@hypermod/mod-atlaskit__calendar': patch
'@hypermod/mod-atlaskit__checkbox': patch
'@hypermod/mod-atlaskit__textarea': patch
'@hypermod/mod-atlaskit__spinner': patch
'@hypermod/mod-emotion__monorepo': patch
'@hypermod/mod-atlaskit__avatar': patch
'@hypermod/mod-atlaskit__button': patch
'@hypermod/mod-atlaskit__popper': patch
'@hypermod/mod-atlaskit__toggle': patch
'@hypermod/mod-atlaskit__popup': patch
'@hypermod/mod-atlaskit__range': patch
'@hypermod/mod-atlaskit__icon': patch
'@hypermod/mod-atlaskit__menu': patch
'@hypermod/mod-atlaskit__tag': patch
'@hypermod/mod-memoize-one': patch
'@hypermod/mod-javascript': patch
'@hypermod/initializer': patch
'@codeshift/cli': patch
'@hypermod/validator': patch
'@hypermod/fetcher': patch
'@hypermod/mod-react': patch
'@hypermod/types': patch
'@hypermod/utils': patch
'@hypermod/core': patch
'@hypermod/cli': patch
---

Bumps typescript to 5.2.2
7 changes: 7 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- run: git status
- name: Check for changes
run: |
if [ $(git status --porcelain | wc -l) -ne 0 ]; then
echo "::error::Changes detected (modified or added files)"
exit 1
fi
- run: yarn validate
env:
CI: true
2 changes: 1 addition & 1 deletion community/@atlaskit__avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__avatar"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__breadcrumbs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__breadcrumbs"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__button"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__calendar"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__checkbox"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__icon"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__menu"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__popper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__popper"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__popup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__popup"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__progress-indicator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__progress-indicator"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__range/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__range"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__section-message/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__section-message"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__side-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__side-navigation"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__spinner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__spinner"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__tag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__tag"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__textarea/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__textarea"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__textfield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__textfield"
}
2 changes: 1 addition & 1 deletion community/@atlaskit__toggle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__toggle"
}
2 changes: 1 addition & 1 deletion community/@emotion__monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@emotion__monorepo"
}
2 changes: 1 addition & 1 deletion community/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/javascript"
}
2 changes: 1 addition & 1 deletion community/memoize-one/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/memoize-one"
}
2 changes: 1 addition & 1 deletion community/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/react"
}
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"docs:start": "cd website && yarn start",
"postinstall": "yarn monorepo:check",
"build": "yarn build:pkgs && yarn build:community",
"build:pkgs": "parcel build packages/*",
"build:pkgs:watch": "parcel watch packages/*",
"build:pkgs": "tsc --build tsconfig.packages.json",
"build:pkgs:watch": "tsc --build --watch tsconfig.packages.json",
"build:community": "parcel build community/*",
"build:community:watch": "parcel watch community/*",
"clean": "rm -rf node_modules/.cache && rimraf packages/**/{tsconfig.tsbuildinfo,lib,dist} community/**/{tsconfig.tsbuildinfo,lib,dist}",
"clean": "rimraf .parcel-cache tsconfig.packages.tsbuildinfo packages/**/{tsconfig.tsbuildinfo,dist} community/**/{tsconfig.tsbuildinfo,dist}",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"validate": "yarn build && yarn lint && yarn monorepo:check && yarn community:validate",
"validate": "yarn lint && yarn monorepo:check && yarn community:validate",
"lint": "eslint --config .eslintrc.js --ext tsx,ts ./packages/**/src ./community/**/src",
"lint:fix": "yarn lint -- --fix",
"types:check": "tsc --noEmit --skipLibCheck",
Expand All @@ -45,7 +45,6 @@
"@manypkg/cli": "^0.20.0",
"@parcel/packager-ts": "^2.8.3",
"@parcel/transformer-typescript-types": "^2.8.3",
"@putout/plugin-remove-unused-variables": "^5.1.0",
"@types/inquirer": "^8.2.1",
"@types/jest": "^29.0.0",
"@types/jscodeshift": "^0.11.6",
Expand All @@ -65,15 +64,14 @@
"junk": "^3.1.0",
"parcel": "^2.8.3",
"prettier": "^2.0.0",
"putout": "^29.5.1",
"rimraf": "^2.6.3",
"semver": "^7.3.5",
"tar": "^6.1.0",
"ts-jest": "^29.0.0",
"ts-loader": "^6.2.1",
"ts-node": "^10.9.1",
"tslib": "^2.2.0",
"typescript": "^4.5.5"
"typescript": "^5.2.2"
},
"resolutions": {
"colors": "1.4.0"
Expand Down
4 changes: 1 addition & 3 deletions packages/cli-alias/bin/codeshift-cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env node
const path = require('path');

const packageJson = require('../package.json');

require(path.join('..', packageJson.main));
require(path.join('..', 'dist', 'index.js'));
31 changes: 13 additions & 18 deletions packages/cli-alias/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./",
"target": "es6",
"esModuleInterop": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"lib": [
"es5",
"scripthost",
"es2015.core",
"es2015.collection",
"es2015.symbol",
"es2015.iterable",
"es2015.promise",
"es2016",
"es2017"
]
"rootDir": "src",
"outDir": "dist",
"baseUrl": "."
},
"include": ["./src/**/*.ts"]
"include": ["src"],
"references": [
{ "path": "../types" },
{ "path": "../core" },
{ "path": "../fetcher" },
{ "path": "../validator" },
{ "path": "../initializer" },
{ "path": "../fetcher" }
]
}
4 changes: 1 addition & 3 deletions packages/cli/bin/hypermod-cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env node
const path = require('path');

const packageJson = require('../package.json');

require(path.join('..', packageJson.main));
require(path.join('..', 'dist', 'index.js'));
4 changes: 2 additions & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import init from './init';
import validate from './validate';
import { InvalidUserInputError, InvalidConfigError } from './errors';

import packageJson from '../package.json';
// import packageJson from '../package.json';

const program = new Command();

program
.enablePositionalOptions()
.version(packageJson.version, '-v, --version')
.version('packageJson.version', '-v, --version')
.name('hypermod')
.argument('[path...]')
.usage('[global options] <file-paths>...')
Expand Down
31 changes: 13 additions & 18 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./",
"target": "es6",
"esModuleInterop": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"lib": [
"es5",
"scripthost",
"es2015.core",
"es2015.collection",
"es2015.symbol",
"es2015.iterable",
"es2015.promise",
"es2016",
"es2017"
]
"rootDir": "src",
"outDir": "dist",
"baseUrl": "."
},
"include": ["./src/**/*.ts"]
"include": ["src"],
"references": [
{ "path": "../types" },
{ "path": "../core" },
{ "path": "../fetcher" },
{ "path": "../validator" },
{ "path": "../initializer" },
{ "path": "../fetcher" }
]
}
Loading

0 comments on commit 5a41594

Please sign in to comment.