On Thu, Oct 1, 2020 at 09:44, Xavier <y...@debian.org> wrote:
Upstream source are really missing, only repacked files are available.
Relevant bug: https://github.com/Rich-Harris/locate-character/issues/6

Attaching the diff between the two dist tarballs. Only addition seems to be that of typings and switching from gitlab.com to github.com.

The missing commits seems to be present in the old repo at https://gitlab.com/Rich-Harris/locate-character/-/commits/master

So we can just take the git snapshot from old repo.

diff -Nuar locate-character-2.0.1/CHANGELOG.md locate-character-2.0.5/CHANGELOG.md
--- locate-character-2.0.1/CHANGELOG.md	2017-05-21 20:21:43.000000000 +0000
+++ locate-character-2.0.5/CHANGELOG.md	2018-01-14 15:08:18.000000000 +0000
@@ -1,5 +1,17 @@
 # locate-character changelog
 
+## 2.0.5
+
+* Fix incorrect `pkg.repository`
+
+## 2.0.4
+
+* Fix typings
+
+## 2.0.2-3
+
+* Add typings to package
+
 ## 2.0.1
 
 * Port to TypeScript, add typings (no change in functionality)
diff -Nuar locate-character-2.0.1/dist/types/index.d.ts locate-character-2.0.5/dist/types/index.d.ts
--- locate-character-2.0.1/dist/types/index.d.ts	1970-01-01 00:00:00.000000000 +0000
+++ locate-character-2.0.5/dist/types/index.d.ts	2018-01-14 15:08:37.000000000 +0000
@@ -0,0 +1,17 @@
+export interface Options {
+    offsetLine?: number;
+    offsetColumn?: number;
+    startIndex?: number;
+}
+export interface Location {
+    line: number;
+    column: number;
+    character: number;
+}
+export declare function getLocator(source: string, options?: Options): {
+    (search: string, startIndex?: number): Location;
+    (search: number): Location;
+};
+declare function locate(source: string, search: string, options?: Options): Location;
+declare function locate(source: string, search: number, options?: Options): Location;
+export { locate };
diff -Nuar locate-character-2.0.1/package.json locate-character-2.0.5/package.json
--- locate-character-2.0.1/package.json	2017-05-21 20:21:58.000000000 +0000
+++ locate-character-2.0.5/package.json	2018-01-14 15:08:22.000000000 +0000
@@ -1,6 +1,6 @@
 {
   "name": "locate-character",
-  "version": "2.0.1",
+  "version": "2.0.5",
   "description": "Get the line and column number of a specific character in a string",
   "main": "dist/locate-character.umd.js",
   "jsnext:main": "dist/locate-character.es.js",
@@ -8,17 +8,15 @@
   "scripts": {
     "test": "mocha",
     "pretest": "npm run build",
-    "build": "rollup -c",
+    "build": "rollup -c && tsc",
     "prepublish": "npm test"
   },
   "files": [
-    "dist",
+    "dist/*.js",
+    "dist/**/*.d.ts",
     "README.md"
   ],
-  "repository": {
-    "type": "git",
-    "url": "git+https://gitlab.com/Rich-Harris/locate-character.git";
-  },
+  "repository": "Rich-Harris/locate-character",
   "keywords": [
     "string",
     "character",
@@ -30,14 +28,14 @@
   "author": "Rich Harris",
   "license": "MIT",
   "bugs": {
-    "url": "https://gitlab.com/Rich-Harris/locate-character/issues";
+    "url": "https://github.com/Rich-Harris/locate-character/issues";
   },
-  "homepage": "https://gitlab.com/Rich-Harris/locate-character#README";,
+  "homepage": "https://github.com/Rich-Harris/locate-character#README";,
   "devDependencies": {
     "mocha": "^3.0.1",
     "rollup": "^0.34.7",
     "rollup-plugin-typescript": "^0.8.1",
     "typescript": "^2.3.2"
   },
-  "types": "./types.d.ts"
+  "types": "./dist/types/index.d.ts"
 }

Reply via email to