mirror of
https://github.com/asadbek064/hyparquet-writer.git
synced 2025-12-05 23:31:54 +00:00
Initial JS project
This commit is contained in:
parent
e41739b12b
commit
3a29bb7bca
26
.github/workflows/ci.yml
vendored
Normal file
26
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: npm i
|
||||
- run: npm run lint
|
||||
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: npm i
|
||||
- run: npx tsc
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: npm i
|
||||
- run: npm run coverage
|
||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
coverage
|
||||
node_modules
|
||||
package-lock.json
|
||||
dist
|
||||
*.tgz
|
||||
7
LICENSE
Normal file
7
LICENSE
Normal file
@ -0,0 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
64
eslint.config.js
Normal file
64
eslint.config.js
Normal file
@ -0,0 +1,64 @@
|
||||
import javascript from '@eslint/js'
|
||||
import jsdoc from 'eslint-plugin-jsdoc'
|
||||
|
||||
export default [
|
||||
{
|
||||
plugins: {
|
||||
jsdoc,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
'atob': false,
|
||||
},
|
||||
},
|
||||
|
||||
rules: {
|
||||
...javascript.configs.recommended.rules,
|
||||
'arrow-spacing': 'error',
|
||||
camelcase: 'off',
|
||||
'comma-spacing': 'error',
|
||||
'comma-dangle': ['error', {
|
||||
arrays: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
imports: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'never',
|
||||
}],
|
||||
'eol-last': 'error',
|
||||
eqeqeq: 'error',
|
||||
'func-style': ['error', 'declaration'],
|
||||
indent: ['error', 2],
|
||||
'jsdoc/check-param-names': 'error',
|
||||
'jsdoc/check-property-names': 'error',
|
||||
'jsdoc/check-tag-names': 'error',
|
||||
'jsdoc/require-param': 'error',
|
||||
'jsdoc/require-param-type': 'error',
|
||||
'jsdoc/require-returns': 'error',
|
||||
'jsdoc/require-returns-type': 'error',
|
||||
'jsdoc/sort-tags': 'error',
|
||||
'no-constant-condition': 'off',
|
||||
'no-extra-parens': 'error',
|
||||
'no-multi-spaces': 'error',
|
||||
'no-trailing-spaces': 'error',
|
||||
'no-undef': 'error',
|
||||
'no-unused-vars': 'error',
|
||||
'no-useless-concat': 'error',
|
||||
'no-useless-rename': 'error',
|
||||
'no-useless-return': 'error',
|
||||
'no-var': 'error',
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'prefer-const': 'error',
|
||||
'prefer-promise-reject-errors': 'error',
|
||||
quotes: ['error', 'single'],
|
||||
'require-await': 'warn',
|
||||
semi: ['error', 'never'],
|
||||
'sort-imports': ['error', {
|
||||
ignoreDeclarationSort: true,
|
||||
ignoreMemberSort: false,
|
||||
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
||||
}],
|
||||
'space-infix-ops': 'error',
|
||||
},
|
||||
},
|
||||
]
|
||||
38
package.json
Normal file
38
package.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "hyparquet-writer",
|
||||
"version": "0.1.0",
|
||||
"description": "Parquet file writer for JavaScript",
|
||||
"author": "Hyperparam",
|
||||
"homepage": "https://hyperparam.app",
|
||||
"keywords": [
|
||||
"hyparquet",
|
||||
"parquet"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/hyparam/hyparquet-writer.git"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"files": [
|
||||
"src"
|
||||
],
|
||||
"type": "module",
|
||||
"types": "src/index.d.ts",
|
||||
"scripts": {
|
||||
"coverage": "vitest run --coverage",
|
||||
"lint": "eslint",
|
||||
"lint:fix": "eslint --fix",
|
||||
"test": "vitest run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "7.26.10",
|
||||
"@types/node": "22.13.10",
|
||||
"@vitest/coverage-v8": "3.0.9",
|
||||
"eslint": "9.22.0",
|
||||
"eslint-plugin-jsdoc": "50.6.8",
|
||||
"hyparquet": "1.9.1",
|
||||
"typescript": "5.8.2",
|
||||
"vitest": "3.0.9"
|
||||
}
|
||||
}
|
||||
0
src/index.js
Normal file
0
src/index.js
Normal file
24
test/package.test.js
Normal file
24
test/package.test.js
Normal file
@ -0,0 +1,24 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import packageJson from '../package.json' with { type: 'json' }
|
||||
|
||||
describe('package.json', () => {
|
||||
it('should have the correct name', () => {
|
||||
expect(packageJson.name).toBe('hyparquet-writer')
|
||||
})
|
||||
it('should have a valid version', () => {
|
||||
expect(packageJson.version).toMatch(/^\d+\.\d+\.\d+$/)
|
||||
})
|
||||
it('should have MIT license', () => {
|
||||
expect(packageJson.license).toBe('MIT')
|
||||
})
|
||||
it('should have precise dev dependency versions', () => {
|
||||
const { devDependencies } = packageJson
|
||||
Object.values(devDependencies).forEach(version => {
|
||||
expect(version).toMatch(/^\d+\.\d+\.\d+$/)
|
||||
})
|
||||
})
|
||||
it('should have no dependencies', () => {
|
||||
expect('dependencies' in packageJson).toBe(false)
|
||||
expect('peerDependencies' in packageJson).toBe(false)
|
||||
})
|
||||
})
|
||||
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"lib": ["esnext", "dom"],
|
||||
"module": "nodenext",
|
||||
"noEmit": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": false,
|
||||
"strict": true,
|
||||
"target": "esnext"
|
||||
},
|
||||
"include": ["src", "test"]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user