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

Publish Library on NPM #581

Merged
merged 8 commits into from
Jan 4, 2024
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
18 changes: 18 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}

- uses: actions/setup-node@v4
with:
node-version: '21.x'
registry-url: 'https://registry.npmjs.org/'

- name: Name and Email for Git (config)
run: |
git config --local user.email "action@github.com"
Expand All @@ -45,6 +50,19 @@ jobs:
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}

- name: Ensure up-to-date Dependencies
run: npm ci

- name: Publish on NPM
# we use publish library because flowr itself is a runnable, and we do not want to publish something with extra
# dist paths etc.
# besides, we make dead-sure we have a clean directory to work on!
run: |
rm -rf dist
npm publish-library
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

performance-test:
name: "Performance Test"
needs: ['release']
Expand Down
23 changes: 23 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules/

/wiki

# Logs
*.log

.git*

# Coverage
/.nyc_output
/coverage

# IDE specific
/.vscode/
/.project/
/.settings/

/.DS_Store
src/**
test/**
**/*.map
.idea/
23 changes: 20 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"name": "flowr",
"name": "@code-inspect/flowr",
"version": "1.3.7",
"description": "Program Slicer and Analyzer for R Programs",
"description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
"main": "dist/src/flowr.js",
"types": "dist/src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/Code-Inspect/flowr.git"
},
"homepage": "https://github.com/Code-Inspect/flowr",
"bugs": {
"url": "https://github.com/Code-Inspect/flowr/issues"
},
"scripts": {
"publish-library": "cp .npmignore package.json README.md LICENSE dist/src/ && cd dist/src && npm publish --provenance --access public",
"main": "ts-node src/flowr.ts",
"stats": "ts-node src/cli/statistics-app.ts",
"stats-helper": "ts-node src/cli/statistics-helper-app.ts",
Expand All @@ -22,7 +32,14 @@
"performance-test": "func() { cd test/performance/ && bash run-all-suites.sh $1 $2; cd ../../; }; func",
"test-full": "npm run test -- --test-installation"
},
"keywords": [],
"keywords": [
"static code analysis",
"R programming language",
"R",
"programming",
"slicing",
"dataflow analysis"
],
"author": "Florian Sihler",
"license": "ISC",
"nyc": {
Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './core'
export * from './slicing'
export * from './dataflow'
export * from './r-bridge'
export * from './benchmark'
export * from './statistics'
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"incremental": true,
"esModuleInterop": true,
"declaration": true,
"resolveJsonModule": true,
"target": "ESNext",
"module": "commonjs",
Expand All @@ -13,7 +14,7 @@
},
"lib": [ "esnext", "dom" ],
"exclude": [
"node_modules",
"node_modules/*"
"node_modules/**/*",
"dist/**/*"
]
}