{"_id":"@ali0113/dbt-formatter","_rev":"3-ef793517788dcd602d60fb1e4bf6e658","name":"@ali0113/dbt-formatter","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@ali0113/dbt-formatter","version":"1.0.0","keywords":["dbt","formatter","jinja","sql","comments"],"author":{"name":"Original: Henri Blancke","email":"blanckehenri@gmail.com"},"license":"MIT","_id":"@ali0113/dbt-formatter@1.0.0","maintainers":[{"name":"ali0113","email":"shekhaliul44@gmail.com"}],"homepage":"https://github.com/alii13/dbt-formatter#readme","bugs":{"url":"https://github.com/alii13/dbt-formatter/issues"},"dist":{"shasum":"d6621fe5851598daed2a9fa6caa6d736d5e2a161","tarball":"https://registry.npmjs.org/@ali0113/dbt-formatter/-/dbt-formatter-1.0.0.tgz","fileCount":6,"integrity":"sha512-TrFzFBpY9T4VAxyp2dRN4altU1mtpA8wYtz0LDvPxRRiE+cnZPHrybjDcLaS41EZ3fFMAKpd3+41qyp6qjdhWA==","signatures":[{"sig":"MEQCIChZxb5BJi73OLMkXfUTrsw5iBCfviovlsIXXlQXFmvnAiAwVu+ckpXif0cmliNZsE349lVGtt2/hZXMWoQZ4GbElA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1814303},"jest":{"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","transform":{".(ts|tsx)":"ts-jest"},"testEnvironment":"node","moduleNameMapper":{"@types":"<rootDir>/src/types","@constants":"<rootDir>/src/constants","@core/(.*)":"<rootDir>/src/core/$1","@utils/(.*)":"<rootDir>/src/utils/$1","@constants/(.*)":"<rootDir>/src/constants/$1"},"coverageThreshold":{"global":{"lines":25,"branches":15,"functions":25,"statements":25}},"collectCoverageFrom":["src/*.{js,ts}"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/","/test/"]},"main":"dist/dbt-formatter.cjs.js","module":"dist/dbt-formatter.esm.js","browser":"dist/dbt-formatter.umd.js","engines":{"node":">=10.0.0"},"gitHead":"a9f1f6e2f96e530108053944c634e21bab2657c4","scripts":{"lint":"tslint  --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'","test":"jest --coverage","build":"npm run prebuild && rollup -c rollup.config.ts","package":"npm run prebuild && npm run build && pkg dist/cli/* --out-path bin --debug","prepare":"npm run build","test:ci":"npm run lint && npm run test -- --no-cache","prebuild":"rimraf dist bin","test:watch":"jest --coverage --watch","tslint-check":"tslint-config-prettier-check ./tslint.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"ali0113","email":"shekhaliul44@gmail.com"},"prettier":{"semi":true,"printWidth":120,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/alii13/dbt-formatter.git","type":"git"},"_npmVersion":"10.9.2","description":"DBT jinja/sql formatter with improved comment handling","directories":{},"lint-staged":{"{src,test}/**/*.ts":["prettier --write","git add"]},"_nodeVersion":"23.10.0","dependencies":{"glob":"^7.1.6","lodash":"^4.17.15","commander":"^5.1.0"},"_hasShrinkwrap":false,"devDependencies":{"pkg":"^4.4.8","jest":"^26.0.1","rimraf":"^3.0.2","rollup":"^2.10.9","tslint":"^6.1.2","ts-jest":"^26.0.0","ts-node":"^8.10.1","typedoc":"^0.17.7","prettier":"^2.0.5","typescript":"^3.9.3","@types/glob":"^7.1.1","@types/jest":"^25.2.3","@types/node":"^14.0.5","jest-config":"^26.0.1","@babel/types":"^7.10.0","@types/lodash":"^4.14.153","lodash.camelcase":"^4.3.0","@rollup/plugin-json":"^4.0.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^9.0.0","@rollup/plugin-commonjs":"^12.0.0","@rollup/plugin-typescript":"^3.1.1","@rollup/plugin-node-resolve":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/dbt-formatter_1.0.0_1746361938579_0.34059788280325565","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ali0113/dbt-formatter","version":"1.0.1","keywords":["dbt","formatter","jinja","sql","comments"],"author":{"name":"Original: Henri Blancke","email":"blanckehenri@gmail.com"},"license":"MIT","_id":"@ali0113/dbt-formatter@1.0.1","maintainers":[{"name":"ali0113","email":"shekhaliul44@gmail.com"}],"homepage":"https://github.com/alii13/dbt-formatter#readme","bugs":{"url":"https://github.com/alii13/dbt-formatter/issues"},"dist":{"shasum":"3f7760b9599f5726bd62dc50c7d2586c937ea6ca","tarball":"https://registry.npmjs.org/@ali0113/dbt-formatter/-/dbt-formatter-1.0.1.tgz","fileCount":6,"integrity":"sha512-jjJBn5XAvbRP6FKG6sdM0ZLn5n1Q82tE0wI3vWwxWnxZUSn35imKtH1xwnPmQHLpS9tWhurk55NZhYdAbHONGA==","signatures":[{"sig":"MEUCIHMqhGJuBPQABdroDoJe82mwRr7/J8sWpbUXq6tjwJoVAiEAukR/M5fayb4QKNaPPql2UkBeG5M1ZZ6G3y20bec3EE8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1814303},"jest":{"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","transform":{".(ts|tsx)":"ts-jest"},"testEnvironment":"node","moduleNameMapper":{"@types":"<rootDir>/src/types","@constants":"<rootDir>/src/constants","@core/(.*)":"<rootDir>/src/core/$1","@utils/(.*)":"<rootDir>/src/utils/$1","@constants/(.*)":"<rootDir>/src/constants/$1"},"coverageThreshold":{"global":{"lines":25,"branches":15,"functions":25,"statements":25}},"collectCoverageFrom":["src/*.{js,ts}"],"moduleFileExtensions":["ts","tsx","js"],"coveragePathIgnorePatterns":["/node_modules/","/test/"]},"main":"dist/dbt-formatter.cjs.js","module":"dist/dbt-formatter.esm.js","browser":"dist/dbt-formatter.umd.js","engines":{"node":">=10.0.0"},"gitHead":"806e35a014ccaf80cbbbc0efacaa85c2e93f57dc","scripts":{"lint":"tslint  --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'","test":"jest --coverage","build":"npm run prebuild && rollup -c rollup.config.ts","package":"npm run prebuild && npm run build && pkg dist/cli/* --out-path bin --debug","prepare":"npm run build","test:ci":"npm run lint && npm run test -- --no-cache","prebuild":"rimraf dist bin","test:watch":"jest --coverage --watch","tslint-check":"tslint-config-prettier-check ./tslint.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"ali0113","email":"shekhaliul44@gmail.com"},"prettier":{"semi":true,"printWidth":120,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/alii13/dbt-formatter.git","type":"git"},"_npmVersion":"10.9.2","description":"DBT jinja/sql formatter with improved comment handling","directories":{},"lint-staged":{"{src,test}/**/*.ts":["prettier --write","git add"]},"_nodeVersion":"23.10.0","dependencies":{"glob":"^7.1.6","lodash":"^4.17.15","commander":"^5.1.0"},"_hasShrinkwrap":false,"devDependencies":{"pkg":"^4.4.8","jest":"^26.0.1","rimraf":"^3.0.2","rollup":"^2.10.9","tslint":"^6.1.2","ts-jest":"^26.0.0","ts-node":"^8.10.1","typedoc":"^0.17.7","prettier":"^2.0.5","typescript":"^3.9.3","@types/glob":"^7.1.1","@types/jest":"^25.2.3","@types/node":"^14.0.5","jest-config":"^26.0.1","@babel/types":"^7.10.0","@types/lodash":"^4.14.153","lodash.camelcase":"^4.3.0","@rollup/plugin-json":"^4.0.3","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^9.0.0","@rollup/plugin-commonjs":"^12.0.0","@rollup/plugin-typescript":"^3.1.1","@rollup/plugin-node-resolve":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/dbt-formatter_1.0.1_1746548886973_0.4589636742419436","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ali0113/dbt-formatter","version":"1.0.2","description":"DBT jinja/sql formatter with improved comment handling","keywords":["dbt","formatter","jinja","sql","comments"],"main":"dist/dbt-formatter.cjs.js","module":"dist/dbt-formatter.esm.js","browser":"dist/dbt-formatter.umd.js","author":{"name":"Original: Henri Blancke","email":"blanckehenri@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/alii13/dbt-formatter.git"},"license":"MIT","bugs":{"url":"https://github.com/alii13/dbt-formatter/issues"},"homepage":"https://github.com/alii13/dbt-formatter#readme","engines":{"node":">=10.0.0"},"scripts":{"test":"jest --coverage","prebuild":"rimraf dist bin","build":"npm run prebuild && rollup -c rollup.config.ts","prepare":"npm run build","prepublishOnly":"npm run build","package":"npm run prebuild && npm run build && pkg dist/cli/* --out-path bin --debug","test:watch":"jest --coverage --watch","test:ci":"npm run lint && npm run test -- --no-cache","tslint-check":"tslint-config-prettier-check ./tslint.json","lint":"tslint  --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'"},"lint-staged":{"{src,test}/**/*.ts":["prettier --write","git add"]},"jest":{"transform":{".(ts|tsx)":"ts-jest"},"testEnvironment":"node","testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"],"moduleNameMapper":{"@types":"<rootDir>/src/types","@core/(.*)":"<rootDir>/src/core/$1","@utils/(.*)":"<rootDir>/src/utils/$1","@constants/(.*)":"<rootDir>/src/constants/$1","@constants":"<rootDir>/src/constants"},"coveragePathIgnorePatterns":["/node_modules/","/test/"],"coverageThreshold":{"global":{"branches":15,"functions":25,"lines":25,"statements":25}},"collectCoverageFrom":["src/*.{js,ts}"]},"prettier":{"semi":true,"singleQuote":true,"trailingComma":"es5","printWidth":120},"devDependencies":{"@babel/types":"^7.10.0","@rollup/plugin-commonjs":"^12.0.0","@rollup/plugin-json":"^4.0.3","@rollup/plugin-node-resolve":"^8.0.0","@rollup/plugin-typescript":"^3.1.1","@types/glob":"^7.1.1","@types/jest":"^25.2.3","@types/lodash":"^4.14.153","@types/node":"^14.0.5","jest":"^26.0.1","jest-config":"^26.0.1","lodash.camelcase":"^4.3.0","pkg":"^4.4.8","prettier":"^2.0.5","rimraf":"^3.0.2","rollup":"^2.10.9","ts-jest":"^26.0.0","ts-node":"^8.10.1","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^9.0.0","typedoc":"^0.17.7","typescript":"^3.9.3"},"dependencies":{"commander":"^5.1.0","glob":"^7.1.6","lodash":"^4.17.15"},"_id":"@ali0113/dbt-formatter@1.0.2","gitHead":"806e35a014ccaf80cbbbc0efacaa85c2e93f57dc","_nodeVersion":"23.10.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-p/vixoY2pmvf1HDdZbwSa6wxyc5qLg7eUbVkzPOfwlar5AlbbMdi+K579L4WaJDqftOwG7sW9AzQ9eXV+4sRvQ==","shasum":"a6deb9eb8f78f9475ba3fcbae26ab8b36724b738","tarball":"https://registry.npmjs.org/@ali0113/dbt-formatter/-/dbt-formatter-1.0.2.tgz","fileCount":6,"unpackedSize":1815293,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICEpv/e2iVFMkq2Bm3NFhqXMnnaVJqI7/rp+F5x1S3bDAiEA5oRaEP7JCGVWOHVPdt5RtALqkoO0bd9EXsLW/jLi5s8="}]},"_npmUser":{"name":"ali0113","email":"shekhaliul44@gmail.com"},"directories":{},"maintainers":[{"name":"ali0113","email":"shekhaliul44@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dbt-formatter_1.0.2_1746550343019_0.5309774798976901"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-04T12:32:18.473Z","modified":"2025-05-06T16:52:23.649Z","1.0.0":"2025-05-04T12:32:18.800Z","1.0.1":"2025-05-06T16:28:07.244Z","1.0.2":"2025-05-06T16:52:23.467Z"},"bugs":{"url":"https://github.com/alii13/dbt-formatter/issues"},"author":{"name":"Original: Henri Blancke","email":"blanckehenri@gmail.com"},"license":"MIT","homepage":"https://github.com/alii13/dbt-formatter#readme","keywords":["dbt","formatter","jinja","sql","comments"],"repository":{"type":"git","url":"git+https://github.com/alii13/dbt-formatter.git"},"description":"DBT jinja/sql formatter with improved comment handling","maintainers":[{"name":"ali0113","email":"shekhaliul44@gmail.com"}],"readme":"[![CircleCI](https://circleci.com/gh/henriblancke/dbt-formatter/tree/master.svg?style=svg)](https://circleci.com/gh/henriblancke/dbt-formatter/tree/master)\n\n# DBT Formatter\n\nA DBT jinja/sql formatter with improved comment handling, particularly fixing issues with comments followed by commas.\n\n## Install\n\n```bash\n# Install from npm\nnpm install -s @ali0113/dbt-formatter\n\n# Or with yarn\nyarn add @ali0113/dbt-formatter\n\n# Or with pnpm\npnpm add @ali0113/dbt-formatter\n```\n\n## Usage\n\n```javascript\nimport formatter from '@ali0113/dbt-formatter';\n\nconst mySql = \"SELECT * FROM {{ ref('myTableRef') }}\";\nconst myOpts = { sql: 'default', indent: 2, upper: false };\n\nformatter.format(mySql, myOpts);\n```\n\nThis will result in:\n\n```sql\nSELECT\n  *\nFROM\n  {{ ref('myTableRef') }}\n```\n\n## Usage options\n\nFine tune `dbt-formatter` behavior with the following options:\n\n| Option         | Default   | Description                                                            |\n| -------------- | --------- | ---------------------------------------------------------------------- |\n| sql            | `default` | The sql dialect you want to use, currently only `default` is available |\n| indent         | `2`       | How many spaces you want an indentation to be                          |\n| upper          | `false`   | Formats sql reserved words to be uppercase when set to `true`          |\n| newline        | `false`   | Appends a new line at the end of the formatted sql string              |\n| lowerWords     | `false`   | Lowercases all `words` as identified by the tokenizer                  |\n| allowCamelcase | `true`    | Allows column names to be camelcased                                   |\n\n## Improvements\n\nThis fork improves the handling of comments in SQL, particularly fixing the following issues:\n\n- Fixed an issue where a comma following a line comment would be incorrectly merged with the comment text\n- Properly handles comments with varying line endings (CRLF vs LF)\n\n## Publishing to npm\n\nTo publish this package to npm:\n\n1. Replace `@your-username` in package.json with your actual npm username\n2. Update repository URLs to point to your GitHub fork\n3. Build the package: `npm run build`\n4. Login to npm: `npm login`\n5. Publish the package: `npm publish --access public`\n\n## Development\n\n### NPM scripts\n\n- `npm test`: Run test suite\n- `npm run build`: Generate bundles and typings\n- `npm run lint`: Lints code\n- `npm run package`: Package dbt-formatter as a binary\n\n## Credits\n\nThis is a fork of [henriblancke/dbt-formatter](https://github.com/henriblancke/dbt-formatter) with improvements for comment handling.\n\n## License\n\nMIT\n\n## Roadmap\n\n- Add more sql dialects:\n  - [x] snowflake\n  - [ ] redshift\n  - [ ] bigquery\n  - [ ] postgres\n  - [ ] presto\n","readmeFilename":"README.md"}