@tricoteuses/senat 2.20.31 → 2.20.32

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.
Files changed (2) hide show
  1. package/lib/loaders.js +6 -1
  2. package/package.json +1 -1
package/lib/loaders.js CHANGED
@@ -50,6 +50,9 @@ function* iterLoadSenatItems(dataDir, dataName, legislatureOrSession, subDir, {
50
50
  console.log(`Found ${changedFiles?.size || 0} changed files (AMR)`);
51
51
  }
52
52
  for (const filePath of iterFilePaths(itemsDir)) {
53
+ if (!filePath.endsWith(".json")) {
54
+ continue;
55
+ }
53
56
  const relativePath = path.relative(path.join(dataDir, dataName), filePath);
54
57
  const gitStatus = changedFiles?.get(relativePath);
55
58
  // Filter by changed files if sinceCommit is specified
@@ -200,7 +203,9 @@ export function* iterLoadSenatDocuments(dataDir, session, documentType, options
200
203
  }
201
204
  export function* iterLoadSenatRapports(dataDir, session, options = {}) {
202
205
  for (const iterItem of iterLoadSenatItems(dataDir, RAPPORT_FOLDER, session, "original", options)) {
203
- yield iterItem;
206
+ if (iterItem.item?.["id"]) {
207
+ yield iterItem;
208
+ }
204
209
  }
205
210
  }
206
211
  export function* iterLoadSenatTextes(dataDir, session, options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tricoteuses/senat",
3
- "version": "2.20.31",
3
+ "version": "2.20.32",
4
4
  "description": "Handle French Sénat's open data",
5
5
  "keywords": [
6
6
  "France",