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

feat(experimental): init li cli for adding data to li #901

Merged
merged 7 commits into from
Feb 20, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
with:
comment-summary-in-pr: always
fail-on-severity: high
allow-licenses: MIT, Apache-2.0, BSD-3-Clause, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, Zlib
allow-licenses: MIT, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, Zlib
fail-on-scopes: development, runtime
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'
43 changes: 43 additions & 0 deletions .github/workflows/experimental-inventory-cli-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: experimental-inventory-cli - Publish to NPM
on:
workflow_dispatch:
inputs:
version:
description: 'release version without v prefix'
required: true
type: string
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: check version matches input
run: |
grep "\"version\": \"${{ github.event.inputs.version }}\"," package.json
working-directory: ./experimental/li-cli

- run: npm ci
working-directory: ./experimental/li-cli

- run: npm run build
working-directory: ./experimental/li-cli

- run: npm publish --access=public
working-directory: ./experimental/li-cli
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 11 additions & 3 deletions .github/workflows/experimental-inventory-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: experimental-inventory - Publish to NPM
on:
push:
tags:
- 'license-inventory-*'
workflow_dispatch:
inputs:
version:
description: 'release version without v prefix'
required: true
type: string
permissions:
contents: read

Expand All @@ -23,6 +26,11 @@ jobs:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: check version matches input
run: |
grep "\"version\": \"${{ github.event.inputs.version }}\"," package.json
working-directory: ./experimental/license-inventory

- run: npm ci
working-directory: ./experimental/license-inventory

Expand Down
13 changes: 13 additions & 0 deletions experimental/li-cli/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { pathsToModuleNameMapper } from 'ts-jest';
import { compilerOptions } from './tsconfig.json';
import type { JestConfigWithTsJest } from 'ts-jest';

const jestConfig: JestConfigWithTsJest = {
roots: ['<rootDir>/src'],
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths),
preset: 'ts-jest',
testEnvironment: 'node',
};

export default jestConfig;
Loading
Loading