Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tsconfig): updating how helpers are handled #50

Merged
merged 3 commits into from
Nov 30, 2023
Merged
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
3 changes: 0 additions & 3 deletions .eslintrc.js

This file was deleted.

95 changes: 0 additions & 95 deletions .github/workflows/linter.yml

This file was deleted.

60 changes: 35 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
name: Node.js Package

name: Build
on:
pull_request:
branches:
- main
push:
branches:
- main

push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
validator:
##
# Runs semantic release in a regular
##
release:
name: Semantic Release
timeout-minutes: 15
runs-on: ubuntu-latest

# https://github.com/semantic-release/npm
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance

steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- uses: RoadieHQ/backstage-entity-validator@70da3dfb77cb4d0e150b9f6de953b806837d16df # tag=v0.3.2
- name: Check out code
uses: actions/checkout@v4
with:
path: 'catalog-info.yaml'
fetch-depth: 2

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # tag=v3.2.0
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: 20
registry-url: 'https://registry.npmjs.org'
scope: '@pocket-tools'
- run: npm ci
- run: npm install -g npm
- name: Install dependencies
run: npm ci
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
14 changes: 14 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build

on:
pull_request:
branches: ["main"]

jobs:
backstage_validator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- uses: RoadieHQ/[email protected]
with:
path: 'catalog-info.yaml'
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ This setups up your Typescript tslint settings based on best practices. Check th

```
npm i -D @pocket-tools/tsconfig # or yarn install --dev @pocket-tools/tsconfig
npx install-peerdeps --dev @pocket-tools/tsconfig
```

2. You will see several dependencies were installed. Now, create (or update) a `tsconfig.json` file with the following content:

If you don't already have one the NPM post install script will create it for you.

```json
{
"extends": "@pocket-tools/tsconfig",
Expand All @@ -36,4 +36,4 @@ If you don't already have one the NPM post install script will create it for you
}
```

Concepts are used from https://github.com/Chatie/tsconfig
Concepts are used from <https://github.com/Chatie/tsconfig>
4 changes: 2 additions & 2 deletions bin/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import fs from 'fs';
import path from 'path';

import { pkgUp } from 'pkg-up';
import { packageUp } from 'package-up';

import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand All @@ -27,7 +27,7 @@ const TSCONFIG_JSON_CONTENT = `{

async function main() {
const cwd = path.join(__dirname, '..', '..');
const pkg = await pkgUp({ cwd });
const pkg = await packageUp({ cwd });
if (!pkg) {
return 0;
}
Expand Down
Loading
Loading