@planning-inspectorate/data-model 2.21.0 → 2.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -164,30 +164,30 @@ The schemas in this repository are written in jsonc (JSON with comments), and ca
164
164
 
165
165
  ## Node.js Usage
166
166
 
167
- To use these schemas in a Node project, add this repo as a dependency (with a particular tag or commit as the version):
167
+ To use these schemas in a Node project, add this repo as a dependency:
168
168
 
169
- `npm i -s Planning-Inspectorate/data-model#some-tag-or-commit`
169
+ `npm i -s @planning-inspectorate/data-model`
170
+
171
+ As usual with npm you can optionally specify a version:
172
+
173
+ `npm i -s @planning-inspectorate/data-model@2.20.0`
170
174
 
171
175
  Then import as required:
172
176
 
173
177
  ```es6
174
- import {loadAllSchemas} from 'pins-data-model';
178
+ import {loadAllSchemas} from '@planning-inspectorate/data-model';
175
179
  ```
176
180
 
177
181
  or to import enum constants, for example:
178
182
 
179
183
  ```es6
180
- import { APPEAL_CASE_STATUS } from 'pins-data-model';
184
+ import { APPEAL_CASE_STATUS } from '@planning-inspectorate/data-model';
181
185
 
182
186
  if (someAppeal.status === APPEAL_CASE_STATUS.COMPLETE) {
183
187
  console.log(`we're done!`);
184
188
  }
185
189
  ```
186
190
 
187
- To upgrade to a different version, simply doing npm command does not seem to get the correct version, so we need to first uninstall and then reinstall. You can do this by running:
188
-
189
- `npm uninstall pins-data-model && npm prune && npm i -s github:Planning-Inspectorate/data-model#some-tag-or-commit`
190
-
191
191
  ### Tests
192
192
 
193
193
  We are starting to add js tests to the models using node test runner
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "2.21.0",
3
+ "version": "2.21.1",
4
4
  "description": "JSON Schemas for the Planning Inspectorate's Data Model",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as Schemas from './schemas';
2
- export * from './enums';
1
+ import * as Schemas from './schemas.js';
2
+ export * from './enums.js';
3
3
 
4
4
  export interface LoadedSchemas {
5
5
  schemas: {