-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
Prepare to publish
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../packages/plugin/README.md |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Build and Publish | ||
|
||
on: push | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./packages/plugin | ||
env: | ||
NPM_DIFUKS_TOKEN: ${{ secrets.NPM_DIFUKS_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PERSONAL_TOKEN }} | ||
|
||
# for yarn version check | ||
- if: github.ref != 'refs/heads/main' | ||
run: | | ||
git fetch --unshallow origin main | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
|
||
- name: Install modules | ||
run: yarn | ||
|
||
- name: Build plugin | ||
run: yarn build | ||
|
||
- name: Lint plugin | ||
run: yarn lint | ||
|
||
- name: Check packages versions | ||
if: github.ref != 'refs/heads/main' | ||
run: yarn version check | ||
|
||
- name: Apply versions | ||
if: github.ref == 'refs/heads/main' | ||
run: yarn version apply | ||
|
||
- name: Publish package | ||
if: github.ref == 'refs/heads/main' | ||
run: yarn npm publish --tolerate-republish | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
commit_message: | | ||
ci: Release packages | ||
[skip ci] | ||
- name: Get package version | ||
if: github.ref == 'refs/heads/main' | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
with: | ||
path: packages/plugin | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
tagging_message: v${{ steps.package-version.outputs.current-version }} | ||
commit_message: | | ||
ci: Release packages | ||
[skip ci] | ||
- name: Get pull request info | ||
if: github.ref == 'refs/heads/main' | ||
id: pull-request-info | ||
uses: actions-ecosystem/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: ncipollo/release-action@v1 | ||
id: create-release | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
skipIfReleaseExists: true | ||
makeLatest: true | ||
name: Release ${{ steps.package-version.outputs.current-version }} | ||
body: ${{ steps.pull-request-info.outputs.body }} | ||
tag: v${{ steps.package-version.outputs.current-version }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.idea | ||
|
||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.13.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"arcanis.vscode-zipfs" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"search.exclude": { | ||
"**/.yarn": true, | ||
"**/.pnp.*": true | ||
}, | ||
"typescript.tsdk": ".yarn/sdks/typescript/lib", | ||
"typescript.enablePromptUseWorkspaceTsdk": true | ||
} |
This file was deleted.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declined: | ||
- ts-overrides-plugin |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
enableGlobalCache: true | ||
|
||
nodeLinker: node-modules | ||
|
||
npmAuthToken: "${NPM_DIFUKS_TOKEN:-}" | ||
|
||
npmPublishAccess: public | ||
|
||
npmRegistryServer: "https://registry.npmjs.com/" | ||
|
||
packageExtensions: | ||
eslint-module-utils@*: | ||
dependencies: | ||
eslint-import-resolver-typescript: 3.6.1 | ||
ts-patch@*: | ||
peerDependencies: | ||
typescript: "*" | ||
|
||
tsEnableAutoTypes: true | ||
|
||
yarnPath: .yarn/releases/yarn-4.0.2.cjs | ||
yarnPath: .yarn/releases/yarn-4.3.0.cjs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,18 @@ | |
"packages/*" | ||
], | ||
"scripts": { | ||
"lint:plugin": "yarn workspace ts-overrides-plugin lint", | ||
"build:plugin": "yarn workspace ts-overrides-plugin build", | ||
"watch:plugin": "yarn workspace ts-overrides-plugin watch", | ||
"build:tspc": "yarn workspace example tspc", | ||
"build:tspc": "yarn workspace example build:tspc", | ||
"build:ts-loader": "yarn workspace example build:ts-loader", | ||
"build:fork-ts": "yarn workspace example build:fork-ts", | ||
"watch:tspc": "yarn workspace example tspc --watch", | ||
"watch:ts-loader": "yarn workspace example build:ts-loader --watch", | ||
"watch:fork-ts": "yarn workspace example build:fork-ts --watch" | ||
"watch:tspc": "yarn workspace example watch:tspc", | ||
"watch:ts-loader": "yarn workspace example watch:ts-loader", | ||
"watch:fork-ts": "yarn workspace example watch:fork-ts" | ||
}, | ||
"packageManager": "[email protected]" | ||
"devDependencies": { | ||
"typescript": "5.5.1-rc" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ts-overrides-plugin example | ||
|
||
Commands: | ||
|
||
```bash | ||
yarn build:tspc | ||
yarn build:ts-loader | ||
yarn build:fork-ts | ||
yarn watch:tspc | ||
yarn watch:ts-loader | ||
yarn watch:fork-ts | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
const path = require("path"); | ||
const path = require('path'); | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
|
||
module.exports = [ | ||
{ | ||
mode: "production", | ||
entry: "./src/index.ts", | ||
mode: 'production', | ||
entry: './src/index.ts', | ||
output: { | ||
path: path.join(__dirname, "build"), | ||
filename: "main.js", | ||
path: path.join(__dirname, 'build'), | ||
filename: 'main.js', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
exclude: /node_modules/, | ||
loader: "babel-loader", | ||
loader: 'babel-loader', | ||
}, | ||
], | ||
}, | ||
plugins: [new ForkTsCheckerWebpackPlugin({ | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin({ | ||
typescript: { | ||
typescriptPath: require.resolve('ts-patch/compiler'), | ||
} | ||
})], | ||
}), | ||
], | ||
resolve: { | ||
extensions: ['.ts', '.js'], | ||
}, | ||
target: "web", | ||
target: 'web', | ||
} | ||
]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
const path = require("path"); | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
const path = require('path'); | ||
|
||
module.exports = [ | ||
{ | ||
mode: "production", | ||
entry: "./src/index.ts", | ||
mode: 'production', | ||
entry: './src/index.ts', | ||
output: { | ||
path: path.join(__dirname, "build"), | ||
filename: "main.js", | ||
path: path.join(__dirname, 'build'), | ||
filename: 'main.js', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
exclude: /node_modules/, | ||
loader: "ts-loader", | ||
loader: 'ts-loader', | ||
options: { | ||
compiler: 'ts-patch/compiler' | ||
compiler: require.resolve('ts-patch/compiler'), | ||
} | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.js'], | ||
}, | ||
target: "web", | ||
target: 'web', | ||
} | ||
]; | ||
]; |