Skip to content
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,10 @@ typings/
# dotenv environment variables file
.env

# IDEs and editors
.idea

#Dist folders
dist/

# End of https://www.gitignore.io/api/node
13 changes: 6 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
const { Reference } = require('./lib/reference');
const { parseQualifiedName, parseQualifiedNameOptimized, parseFamiliarName, parseAll } = require('./lib/parsers');

Object.assign(exports, {
Reference,
parseQualifiedName,
parseQualifiedNameOptimized,
parseFamiliarName,
parseAll
});
// please export like this to work fine with typescript definitions
exports.Reference = Reference;
exports.parseQualifiedName = parseQualifiedName;
exports.parseQualifiedNameOptimized = parseQualifiedNameOptimized;
exports.parseFamiliarName = parseFamiliarName;
exports.parseAll = parseAll;
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "@codefresh-io/docker-reference",
"version": "0.0.8",
"description": "A node.js pacakge to parse docker image reference",
"version": "0.0.9",
"description": "A node.js package to parse docker image reference",
"main": "index.js",
"types": "./dist/index.d.ts",
"repository": "https://github.com/codefresh-io/node-docker-reference",
"author": "Roy Shmueli <[email protected]>",
"license": "MIT",
Expand All @@ -11,11 +12,13 @@
"test:coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- tests/**/*.spec.js",
"lint": "eslint --rule 'no-trailing-spaces: [\"warn\", { \"skipBlankLines\": false }]' \"./src/**/*.js\"",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"depcheck": "depcheck --ignores rimraf",
"depcheck": "depcheck --ignores='rimraf,@types/*'",
"clean": "rimraf ./coverage",
"publish": "publish"
"build:ts-definitions": "tsc",
"publish": "yarn build:definitions && publish"
},
"devDependencies": {
"@types/node": "^16.11.12",
"chai": "^3.5.0",
"coveralls": "^2.13.1",
"depcheck": "^0.6.7",
Expand All @@ -28,7 +31,8 @@
"istanbul": "^0.4.5",
"mocha": "^3.4.2",
"publish": "^0.6.0",
"rimraf": "^2.6.1"
"rimraf": "^2.6.1",
"typescript": "^4.5.3"
},
"dependencies": {
"re2": "^1.16.0"
Expand Down
10 changes: 10 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": ["./index.js"],
"compilerOptions": {
"allowJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "dist",
"declarationMap": true
}
}
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==

"@types/node@^16.11.12":
version "16.11.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.12.tgz#ac7fb693ac587ee182c3780c26eb65546a1a3c10"
integrity sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==

abbrev@1, [email protected], abbrev@~1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
Expand Down Expand Up @@ -2919,6 +2924,11 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@^4.5.3:
version "4.5.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.3.tgz#afaa858e68c7103317d89eb90c5d8906268d353c"
integrity sha512-eVYaEHALSt+s9LbvgEv4Ef+Tdq7hBiIZgii12xXJnukryt3pMgJf6aKhoCZ3FWQsu6sydEnkg11fYXLzhLBjeQ==

uglify-js@^2.6:
version "2.8.27"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c"
Expand Down